上一页 1 ··· 26 27 28 29 30 31 32 33 34 ··· 37 下一页
摘要: Given some number of floors and some number of eggs, what is the minimum number of attempts it will take to find out from which floor egg will break. 阅读全文
posted @ 2017-08-18 07:08 Review->Improve 阅读(178) 评论(0) 推荐(0) 编辑
摘要: Given certain jobs with start and end time and amount you make on finishing the job, find the maximum value you can make by scheduling jobs in non-ove 阅读全文
posted @ 2017-08-18 05:00 Review->Improve 阅读(1422) 评论(0) 推荐(0) 编辑
摘要: Given a rod of length and prices at which different length of this rod can sell, how do you cut this rod to maximize profit. Solution. Dynamic Program 阅读全文
posted @ 2017-08-18 02:10 Review->Improve 阅读(221) 评论(0) 推荐(0) 编辑
摘要: Given two strings, find longest common substring between them. Solution 1. Brute force search, O(n^2 * m), O(1) memory Algorithm. O(n^2) runtime to fi 阅读全文
posted @ 2017-08-18 01:00 Review->Improve 阅读(284) 评论(0) 推荐(0) 编辑
摘要: Given an array with n distinct elements, convert the given array to a form where all elements are in range from 0 to n-1. The order of elements is sam 阅读全文
posted @ 2017-08-17 06:05 Review->Improve 阅读(364) 评论(0) 推荐(0) 编辑
摘要: Given a sorted array, this array is rotated by some unknown times. Find if there is a pair in this array that sums to a given value. Solution 1. O(n * 阅读全文
posted @ 2017-08-17 05:41 Review->Improve 阅读(335) 评论(0) 推荐(0) 编辑
摘要: Given keys and frequency at which these keys are searched, how would you create a binary search tree from these keys such that the cost of searching i 阅读全文
posted @ 2017-08-16 14:14 Review->Improve 阅读(593) 评论(0) 推荐(0) 编辑
摘要: Write a program to delete a tree. Solution. To delete all tree nodes, we need to set all non-leaf nodes' children nodes to null. So for a given non-le 阅读全文
posted @ 2017-08-16 09:53 Review->Improve 阅读(153) 评论(0) 推荐(0) 编辑
摘要: Write a function to detect if two trees are isomorphic. Two trees are called isomorphic if one of them can be obtained from other by a series of flips 阅读全文
posted @ 2017-08-16 09:42 Review->Improve 阅读(273) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, where every node value is a number . Find the sum of all the numbers which are formed from root to leaf paths. For example consid 阅读全文
posted @ 2017-08-16 03:25 Review->Improve 阅读(211) 评论(0) 推荐(0) 编辑
上一页 1 ··· 26 27 28 29 30 31 32 33 34 ··· 37 下一页