上一页 1 ··· 28 29 30 31 32 33 34 35 36 ··· 38 下一页
摘要: Given some matrices, in what order you would multiply them to minimize cost of multiplication. The following problem formulation is extracted from thi 阅读全文
posted @ 2017-08-04 12:31 Review->Improve 阅读(507) 评论(0) 推荐(0)
摘要: Given a sorted array. Write a program that creates a Balanced Binary Search Tree using array elements. If there are n elements in array, then floor(n/ 阅读全文
posted @ 2017-08-04 00:45 Review->Improve 阅读(230) 评论(0) 推荐(0)
摘要: Given a Binary Tree, Print the corner nodes at each level. The node at the leftmost and the node at the rightmost. For example, output for following i 阅读全文
posted @ 2017-08-03 11:42 Review->Improve 阅读(287) 评论(0) 推荐(0)
摘要: Given two strings, find the longest common subsequence (LCS). Your code should return the length of LCS. Given two strings, find the longest common su 阅读全文
posted @ 2017-08-02 14:02 Review->Improve 阅读(191) 评论(0) 推荐(0)
摘要: Given a string s and a dictionary of words dict, determine if s can be break into a space-separated sequence of one or more dictionary words. Example 阅读全文
posted @ 2017-08-01 15:36 Review->Improve 阅读(361) 评论(0) 推荐(0)
摘要: A Maze is given as N*N binary matrix of blocks where source block is the upper left most block i.e., maze[0][0] and destination block is lower rightmo 阅读全文
posted @ 2017-08-01 07:03 Review->Improve 阅读(820) 评论(0) 推荐(0)
摘要: Give a number n, check if it is a fibonacci number. Solution 1. Generate a sequence of fibonacci number until we have a fibonacci number that is eithe 阅读全文
posted @ 2017-08-01 00:48 Review->Improve 阅读(144) 评论(0) 推荐(0)
摘要: Given an unsorted array, find the largest pair sum. Solution 1. O(n*logn) runtime, using sorting Solution 2. O(n) runtime, using heapify (max priority 阅读全文
posted @ 2017-07-22 05:17 Review->Improve 阅读(252) 评论(0) 推荐(0)
摘要: Given a string, reverse it without using any temporary variables. This problem is a variation of the problem swapping two integers without using any t 阅读全文
posted @ 2017-07-22 01:03 Review->Improve 阅读(163) 评论(0) 推荐(0)
摘要: Given an array nums containing n + 1 integers where each integer is between 1 and n (inclusive), prove that at least one duplicate number must exist. 阅读全文
posted @ 2017-07-21 14:36 Review->Improve 阅读(343) 评论(0) 推荐(0)
上一页 1 ··· 28 29 30 31 32 33 34 35 36 ··· 38 下一页