程序媛詹妮弗
终身学习
上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 30 下一页
摘要: Given two integers n and k, return all possible combinations of k numbers out of 1 ... n. Example: Input: n = 4, k = 2 Output: [ [2,4], [3,4], [2,3], 阅读全文
posted @ 2018-10-22 07:06 程序媛詹妮弗 阅读(104) 评论(0) 推荐(0) 编辑
摘要: Given a string containing only three types of characters: '(', ')' and '*', write a function to check whether this string is valid. We define the vali 阅读全文
posted @ 2018-10-22 07:03 程序媛詹妮弗 阅读(116) 评论(0) 推荐(0) 编辑
摘要: Design a max stack that supports push, pop, top, peekMax and popMax. Example 1: Note: 题目 思路 1. maintain stack to track all the data 2. maintain maxSta 阅读全文
posted @ 2018-10-22 06:31 程序媛詹妮弗 阅读(694) 评论(0) 推荐(0) 编辑
摘要: Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. Example: 阅读全文
posted @ 2018-10-22 06:15 程序媛詹妮弗 阅读(166) 评论(0) 推荐(0) 编辑
摘要: Given an unsorted array of integers, find the length of the longest consecutive elements sequence. Your algorithm should run in O(n) complexity. Examp 阅读全文
posted @ 2018-10-22 06:05 程序媛詹妮弗 阅读(135) 评论(0) 推荐(0) 编辑
摘要: Given a non-empty 2D array grid of 0's and 1's, an island is a group of 1's (representing land) connected 4-directionally (horizontal or vertical.) Yo 阅读全文
posted @ 2018-10-21 16:02 程序媛詹妮弗 阅读(207) 评论(0) 推荐(0) 编辑
摘要: Implement atoi which converts a string to an integer. The function first discards as many whitespace characters as necessary until the first non-white 阅读全文
posted @ 2018-10-21 15:11 程序媛詹妮弗 阅读(130) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example, this binary tree [1,2,2,3,4,4,3] is symmet 阅读全文
posted @ 2018-10-21 14:59 程序媛詹妮弗 阅读(112) 评论(0) 推荐(0) 编辑
摘要: Given a sorted array, two integers k and x, find the k closest elements to x in the array. The result should also be sorted in ascending order. If the 阅读全文
posted @ 2018-10-21 14:30 程序媛詹妮弗 阅读(297) 评论(0) 推荐(0) 编辑
摘要: Given a non-empty list of words, return the k most frequent elements. Your answer should be sorted by frequency from highest to lowest. If two words h 阅读全文
posted @ 2018-10-21 07:54 程序媛詹妮弗 阅读(154) 评论(0) 推荐(0) 编辑
上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 30 下一页