随笔分类 -  Great Questions

上一页 1 ··· 3 4 5 6 7
摘要:Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST. Example 2 1->2->3 => / \ 1 3 分析:非常简单,用递归 阅读全文
posted @ 2016-07-03 06:00 北叶青藤 阅读(252) 评论(0) 推荐(0)
摘要:Remove Duplicates from Sorted List I Given a sorted linked list, delete all duplicates such that each element appear only once. Remove Duplicates from 阅读全文
posted @ 2016-07-03 04:36 北叶青藤 阅读(194) 评论(0) 推荐(0)
摘要:560. Subarray Sum Equals K Given an array of integers and an integer k, you need to find the total number of continuous subarrays whose sum equals to  阅读全文
posted @ 2016-07-01 07:57 北叶青藤 阅读(228) 评论(0) 推荐(0)
摘要:Flatten a binary tree to a fake "linked list" in pre-order traversal. Here we use the right pointer in TreeNode as the next pointer in ListNode. For e 阅读全文
posted @ 2016-07-01 02:31 北叶青藤 阅读(275) 评论(0) 推荐(0)
摘要:Given n non-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the hist 阅读全文
posted @ 2016-06-30 12:11 北叶青藤 阅读(283) 评论(0) 推荐(0)
摘要:Given an integer array, adjust each integers so that the difference of every adjacent integers are not greater than a given number target. If the arra 阅读全文
posted @ 2016-06-29 10:57 北叶青藤 阅读(522) 评论(0) 推荐(0)
摘要:Word Search I Given a 2D board and a word, find if the word exists in the grid. The word can be constructed from letters of sequentially adjacent cell 阅读全文
posted @ 2016-06-29 03:13 北叶青藤 阅读(313) 评论(0) 推荐(0)
摘要:Question: Find the longest sub-string without repeating characters. For example, if the given string is "abcdcefg", the longest sub-string is "dcefg". 阅读全文
posted @ 2015-01-26 05:50 北叶青藤 阅读(202) 评论(0) 推荐(0)
摘要:Word Break I Given a string s and a dictionary of words dict, determine if s can be segmented into a space-separated sequence of one or more dictionar 阅读全文
posted @ 2015-01-26 05:49 北叶青藤 阅读(249) 评论(0) 推荐(0)
摘要:Question: Give a string, use minimum number of splits to divide the string into multiple parts in which each part a palindrome. For example, if the st 阅读全文
posted @ 2015-01-26 05:46 北叶青藤 阅读(181) 评论(0) 推荐(0)
摘要:Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. For example,"A man, a plan, a canal: Pan 阅读全文
posted @ 2015-01-10 08:35 北叶青藤 阅读(158) 评论(0) 推荐(0)
摘要:Write a program to solve a Sudoku puzzle by filling the empty cells. Empty cells are indicated by the character '.'. You may assume that there will be 阅读全文
posted @ 2015-01-02 06:30 北叶青藤 阅读(192) 评论(0) 推荐(0)
摘要:Subsets I Given a set of distinct integers, return all possible subsets. Notice Elements in a subset must be in non-descending order. The solution set 阅读全文
posted @ 2014-12-31 11:24 北叶青藤 阅读(354) 评论(0) 推荐(0)

上一页 1 ··· 3 4 5 6 7