上一页 1 2 3 4 5 6 ··· 46 下一页
  2018年8月12日
摘要: On a 2 dimensional grid with R rows and C columns, we start at (r0, c0) facing east. Here, the north west corner of the grid is at the first row and c 阅读全文
posted @ 2018-08-12 11:35 Beserious 阅读(406) 评论(0) 推荐(0) 编辑
摘要: Given a set of N people (numbered 1, 2, ..., N), we would like to split everyone into two groups of any size. Each person may dislike some other peopl 阅读全文
posted @ 2018-08-12 11:30 Beserious 阅读(209) 评论(0) 推荐(0) 编辑
  2018年7月16日
摘要: 题目要求不修改链表结构,同时不用额外的内存,去找到链表中环的起点。 我们可以通过快慢指针很容易判断有没有环,接下来,再把快指针的步伐也变为1并从head开始走,那么快慢指针再次相遇对应的指针就是环的起点。 解释:可以把问题抽象成一个直线和圈的结构, 粉色点表示相遇点,那么快指针走过a+b+c+b,慢 阅读全文
posted @ 2018-07-16 19:43 Beserious 阅读(122) 评论(0) 推荐(0) 编辑
  2018年7月11日
摘要: Given an integer array nums, find the contiguous subarray within an array (containing at least one number) which has the largest product. 题意:求最大的连乘。 思 阅读全文
posted @ 2018-07-11 21:06 Beserious 阅读(128) 评论(0) 推荐(0) 编辑
  2018年7月1日
摘要: At a lemonade stand, each lemonade costs $5. Customers are standing in a queue to buy from you, and order one at a time (in the order specified by bil 阅读全文
posted @ 2018-07-01 14:49 Beserious 阅读(251) 评论(0) 推荐(0) 编辑
摘要: We are given a binary tree (with root node root), a target node, and an integer value . Return a list of the values of all nodes that have a distance 阅读全文
posted @ 2018-07-01 11:44 Beserious 阅读(669) 评论(0) 推荐(0) 编辑
  2018年6月24日
摘要: Given a balanced parentheses string S, compute the score of the string based on the following rule: Example 1: Input: "()" Output: 1 Example 2: Input: 阅读全文
posted @ 2018-06-24 14:40 Beserious 阅读(398) 评论(0) 推荐(0) 编辑
摘要: Given two strings A and B of lowercase letters, return true if and only if we can swap two letters in A so that the result equals B. 题目大意:给出A,B两个字符串,问 阅读全文
posted @ 2018-06-24 11:23 Beserious 阅读(397) 评论(0) 推荐(0) 编辑
  2018年4月4日
摘要: Initially on a notepad only one character 'A' is present. You can perform two operations on this notepad for each step: Copy All: You can copy all the 阅读全文
posted @ 2018-04-04 23:21 Beserious 阅读(201) 评论(0) 推荐(0) 编辑
  2018年4月3日
摘要: Given an array of non negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maxim 阅读全文
posted @ 2018-04-03 13:39 Beserious 阅读(139) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 46 下一页