Fork me on GitHub
上一页 1 2 3 4 5 6 7 8 9 10 ··· 16 下一页
摘要: /** * * @author gentleKay * Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length. * 阅读全文
posted @ 2019-08-05 10:46 gentleKay 阅读(116) 评论(0) 推荐(0) 编辑
摘要: /** * * @author gentleKay * Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. * For example, giv 阅读全文
posted @ 2019-08-02 11:13 gentleKay 阅读(321) 评论(0) 推荐(0) 编辑
摘要: /** * * @author gentleKay * Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with t 阅读全文
posted @ 2019-08-02 11:12 gentleKay 阅读(165) 评论(0) 推荐(0) 编辑
摘要: /** * * @author gentleKay * Given a binary tree, return the preorder traversal of its nodes' values. * For example: * Given binary tree{1,#,2,3}, * 1 阅读全文
posted @ 2019-08-01 16:11 gentleKay 阅读(134) 评论(0) 推荐(0) 编辑
摘要: /** * * @author gentleKay * Given an array of integers, every element appears three times except for one. Find that single one. * Note: * Your algorit 阅读全文
posted @ 2019-08-01 15:12 gentleKay 阅读(236) 评论(0) 推荐(0) 编辑
摘要: /** * * @author gentleKay * Merge two sorted linked lists and return it as a new list. * The new list should be made by splicing together the nodes of 阅读全文
posted @ 2019-08-01 15:08 gentleKay 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 获取map集合中键和值的三种方式 有三种。 关于获取map集合中键和值这个用法的话,可以用到OJ题中。比如:给你一个数组,除了一个数字数量是一个,其他数字都有三个或者三个以上。就可以用Map来解决。 也可以用 ^ 运算符解决。 因为 5^5 = 0; 0^5 = 5;就可以得到答案,具体问题具体分析 阅读全文
posted @ 2019-08-01 15:07 gentleKay 阅读(14987) 评论(0) 推荐(0) 编辑
摘要: /** * * @author gentleKay * You are given an n x n 2D matrix representing an image. * Rotate the image by 90 degrees (clockwise). * Follow up: * Could 阅读全文
posted @ 2019-07-31 15:40 gentleKay 阅读(243) 评论(0) 推荐(0) 编辑
摘要: /** * * @author gentleKay * Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: * Int 阅读全文
posted @ 2019-07-31 15:33 gentleKay 阅读(136) 评论(0) 推荐(0) 编辑
摘要: /** * * @author gentleKay * The gray code is a binary numeral system where two successive values differ in only one bit. * Given a non-negative intege 阅读全文
posted @ 2019-07-31 15:31 gentleKay 阅读(289) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 16 下一页