摘要: You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single 阅读全文
posted @ 2016-04-15 09:22 YuriFLAG 阅读(135) 评论(0) 推荐(0)
摘要: You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single 阅读全文
posted @ 2016-04-15 09:22 YuriFLAG 阅读(156) 评论(0) 推荐(0)
摘要: Given a sorted array of n integers, find the starting and ending position of a given target value. If the target is not found in the array, return [-1 阅读全文
posted @ 2016-04-09 09:14 YuriFLAG 阅读(126) 评论(0) 推荐(0)
摘要: Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in or 阅读全文
posted @ 2016-04-09 09:03 YuriFLAG 阅读(133) 评论(0) 推荐(0)
摘要: Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of s. For exampl 阅读全文
posted @ 2016-04-08 09:43 YuriFLAG 阅读(152) 评论(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-04-07 10:05 YuriFLAG 阅读(153) 评论(0) 推荐(0)
摘要: Given a list of words and an integer k, return the top k frequent words in the list. You should order the words by the frequency of them in the return 阅读全文
posted @ 2016-04-06 11:18 YuriFLAG 阅读(616) 评论(0) 推荐(0)
摘要: Write a program to check whether a given number is an ugly number`. Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. For ex 阅读全文
posted @ 2016-04-06 09:48 YuriFLAG 阅读(166) 评论(0) 推荐(0)
摘要: Given k sorted integer arrays, merge them into one sorted array. Challenge Do it in O(N log k). N is the total number of integers. k is the number of 阅读全文
posted @ 2016-04-05 16:28 YuriFLAG 阅读(358) 评论(0) 推荐(0)
摘要: Write a method anagram(s,t) to decide if two strings are anagrams or not. Example Given s="abcd", t="dcab", return true. 根据定义可知,两个字符串为anagrams,则每个字符出现 阅读全文
posted @ 2016-04-04 21:30 YuriFLAG 阅读(225) 评论(0) 推荐(0)