06 2015 档案

摘要:题目:TheEmployeetable holds all employees. Every employee has an Id, and there is also a column for the department Id.+----+-------+--------+-----------... 阅读全文
posted @ 2015-06-30 09:25 可爱的波儿胖 阅读(252) 评论(0) 推荐(0) 编辑
摘要:题目:Given an integer array of sizen, find all elements that appear more than⌊ n/3 ⌋times. The algorithm should run in linear time and in O(1) space.题意:... 阅读全文
posted @ 2015-06-29 20:42 可爱的波儿胖 阅读(583) 评论(0) 推荐(0) 编辑
摘要:题目:Implement a basic calculator to evaluate a simple expression string.The expression string contains onlynon-negativeintegers,+,-,*,/operators and em... 阅读全文
posted @ 2015-06-29 19:41 可爱的波儿胖 阅读(1134) 评论(0) 推荐(0) 编辑
摘要:题目:TheEmployeetable holds all employees. Every employee has an Id, a salary, and there is also a column for the department Id.+----+-------+--------+-... 阅读全文
posted @ 2015-06-29 14:40 可爱的波儿胖 阅读(190) 评论(0) 推荐(0) 编辑
摘要:Write a SQL query to get the second highest salary from theEmployeetable.+----+--------+| Id | Salary |+----+--------+| 1 | 100 || 2 | 200 || ... 阅读全文
posted @ 2015-06-24 16:06 可爱的波儿胖 阅读(165) 评论(0) 推荐(0) 编辑
摘要:题目:题目太长了,见链接-- >The Skyline ProblemNotes:The number of buildings in any input list is guaranteed to be in the range[0, 10000].The input list is alread... 阅读全文
posted @ 2015-06-21 16:31 可爱的波儿胖 阅读(1926) 评论(0) 推荐(0) 编辑
摘要:题目:Invert a binary tree. 4 / \ 2 7 / \ / \1 3 6 9to 4 / \ 7 2 / \ / \9 6 3 1Trivia:This problem was inspired byt... 阅读全文
posted @ 2015-06-20 12:29 可爱的波儿胖 阅读(371) 评论(0) 推荐(0) 编辑
摘要:题目:Implement the following operations of a stack using queues.push(x) -- Push element x onto stack.pop() -- Removes the element on top of the stack.to... 阅读全文
posted @ 2015-06-20 11:40 可爱的波儿胖 阅读(315) 评论(0) 推荐(0) 编辑
摘要:题目:Implement a basic calculator to evaluate a simple expression string.The expression string may contain open(and closing parentheses), the plus+or mi... 阅读全文
posted @ 2015-06-20 11:24 可爱的波儿胖 阅读(934) 评论(0) 推荐(0) 编辑
摘要:题目:Given acompletebinary tree, count the number of nodes.Definition of a complete binary tree fromWikipedia:In a complete binary tree every level, exc... 阅读全文
posted @ 2015-06-19 11:34 可爱的波儿胖 阅读(924) 评论(0) 推荐(0) 编辑
摘要:题目:Given a string S, you are allowed to convert it to a palindrome by adding characters in front of it. Find and return the shortest palindrome you ca... 阅读全文
posted @ 2015-06-18 21:46 可爱的波儿胖 阅读(156) 评论(0) 推荐(0) 编辑
摘要:题目:Say you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the maximum profit. You may complet... 阅读全文
posted @ 2015-06-18 09:55 可爱的波儿胖 阅读(185) 评论(0) 推荐(0) 编辑
摘要:题目:Given two words (startandend), and a dictionary, find all shortest transformation sequence(s) fromstarttoend, such that:Only one letter can be chan... 阅读全文
posted @ 2015-06-14 14:05 可爱的波儿胖 阅读(236) 评论(0) 推荐(0) 编辑
摘要:题目: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 max... 阅读全文
posted @ 2015-06-08 20:21 可爱的波儿胖 阅读(196) 评论(0) 推荐(0) 编辑
摘要:题目:You are given a string,s, and a list of words,words, that are all of the same length. Find all starting indices of substring(s) insthat is a concat... 阅读全文
posted @ 2015-06-05 20:48 可爱的波儿胖 阅读(172) 评论(0) 推荐(0) 编辑
摘要:题目:Given a linked list, reverse the nodes of a linked listkat a time and return its modified list.If the number of nodes is not a multiple ofkthen lef... 阅读全文
posted @ 2015-06-05 15:13 可爱的波儿胖 阅读(141) 评论(0) 推荐(0) 编辑
摘要:题目:There are two sorted arraysnums1andnums2of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity sho... 阅读全文
posted @ 2015-06-04 20:36 可爱的波儿胖 阅读(209) 评论(0) 推荐(0) 编辑
摘要:题目:Given a 2D binary matrix filled with 0's and 1's, find the largest square containing all 1's and return its area.For example, given the following m... 阅读全文
posted @ 2015-06-04 16:03 可爱的波儿胖 阅读(187) 评论(0) 推荐(0) 编辑
摘要:题目:Given an array of integers, find out whether there are two distinct indicesiandjin the array such that the difference betweennums[i]andnums[j]is at... 阅读全文
posted @ 2015-06-04 14:02 可爱的波儿胖 阅读(379) 评论(0) 推荐(0) 编辑
摘要:题目:Design a data structure that supports the following two operations:void addWord(word)bool search(word)search(word) can search a literal word or a r... 阅读全文
posted @ 2015-06-03 16:13 可爱的波儿胖 阅读(303) 评论(0) 推荐(0) 编辑
摘要:题目:There are a total ofncourses you have to take, labeled from0ton - 1.Some courses may have prerequisites, for example to take course 0 you have to f... 阅读全文
posted @ 2015-06-02 20:54 可爱的波儿胖 阅读(485) 评论(0) 推荐(0) 编辑
摘要:题目:Given an array ofnpositive integers and a positive integers, find the minimal length of a subarray of which the sum ≥s. If there isn't one, return ... 阅读全文
posted @ 2015-06-02 10:46 可爱的波儿胖 阅读(178) 评论(0) 推荐(0) 编辑
摘要:题目:Given two stringssandt, determine if they are isomorphic.Two strings are isomorphic if the characters inscan be replaced to gett.All occurrences of... 阅读全文
posted @ 2015-06-02 10:23 可爱的波儿胖 阅读(144) 评论(0) 推荐(0) 编辑
摘要:题目:Implement a trie withinsert,search, andstartsWithmethods.// Your Trie object will be instantiated and called as such:// Trie trie = new Trie();// t... 阅读全文
posted @ 2015-06-02 10:04 可爱的波儿胖 阅读(548) 评论(0) 推荐(0) 编辑
摘要:题目:There are a total ofncourses you have to take, labeled from0ton - 1.Some courses may have prerequisites, for example to take course 0 you have to f... 阅读全文
posted @ 2015-06-01 20:45 可爱的波儿胖 阅读(372) 评论(0) 推荐(0) 编辑
摘要:题目:Remove all elements from a linked list of integers that have valueval.ExampleGiven:1 --> 2 --> 6 --> 3 --> 4 --> 5 --> 6,val= 6Return:1 --> 2 --> 3... 阅读全文
posted @ 2015-06-01 11:29 可爱的波儿胖 阅读(176) 评论(0) 推荐(0) 编辑
摘要:题目:Given a range [m, n] where 0 >= 1; n >>= 1; offset++; } return m << offset; }}参考链接:http://blog.csdn.... 阅读全文
posted @ 2015-06-01 10:47 可爱的波儿胖 阅读(138) 评论(0) 推荐(0) 编辑
摘要:题目:Given a 2d grid map of'1's (land) and'0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjace... 阅读全文
posted @ 2015-06-01 09:59 可爱的波儿胖 阅读(231) 评论(0) 推荐(0) 编辑

友情链接 : CodeForge源码分享