上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 29 下一页

349. Intersection of Two Arrays

摘要: Given two arrays, write a function to compute their intersection. Example: Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2]. 阅读全文
posted @ 2017-03-05 04:23 123_123 阅读(84) 评论(0) 推荐(0) 编辑

347. Top K Frequent Elements

摘要: Given a non-empty array of integers, return the k most frequent elements. For example, Given [1,1,1,2,2,3] and k = 2, return [1,2]. 阅读全文
posted @ 2017-03-05 03:55 123_123 阅读(76) 评论(0) 推荐(0) 编辑

389. Find the Difference

摘要: Given two strings s and t which consist of only lowercase letters. String t is generated by random shuffling string s and then add one more letter at 阅读全文
posted @ 2017-03-05 03:23 123_123 阅读(68) 评论(0) 推荐(0) 编辑

136. Single Number

摘要: Given an array of integers, every element appears twice except for one. Find that single one. //只有一个元素不一样。那么集合中所有元素异或就可以得到结果。 阅读全文
posted @ 2017-03-05 02:44 123_123 阅读(69) 评论(0) 推荐(0) 编辑

463. Island Perimeter

摘要: You are given a map in form of a two-dimensional integer grid where 1 represents land and 0 represents water. Grid cells are connected horizontally/ve 阅读全文
posted @ 2017-03-05 02:42 123_123 阅读(69) 评论(0) 推荐(0) 编辑

500. Keyboard Row

摘要: Given a List of words, return the words that can be typed using letters of alphabet on only one row's of American keyboard like the image below. Examp 阅读全文
posted @ 2017-03-05 02:05 123_123 阅读(83) 评论(0) 推荐(0) 编辑

530. Minimum Absolute Difference in BST

摘要: //二叉搜索树随意两个节点差绝对值的最小值 // .中序遍历得到有序数组,逐个比较差值。 阅读全文
posted @ 2017-03-05 00:27 123_123 阅读(81) 评论(0) 推荐(0) 编辑

82. Remove Duplicates from Sorted List II

摘要: Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list. For example, Given 1-> 阅读全文
posted @ 2017-03-04 23:41 123_123 阅读(69) 评论(0) 推荐(0) 编辑

141. Linked List Cycle

摘要: Given a linked list, determine if it has a cycle in it. 阅读全文
posted @ 2017-03-04 22:45 123_123 阅读(62) 评论(0) 推荐(0) 编辑

147. Insertion Sort List

摘要: Sort a linked list using insertion sort. //链表的插入排序 阅读全文
posted @ 2017-03-04 09:50 123_123 阅读(83) 评论(0) 推荐(0) 编辑
上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 29 下一页