随笔分类 -  LintCode

摘要:Given a list of numbers with duplicate number in it. Find all unique permutations. Have you met this question in a real interview? Yes Given a list of 阅读全文
posted @ 2017-09-28 10:15 Review->Improve 阅读(306) 评论(0) 推荐(0)
摘要:Given a list of numbers, return all possible permutations. You can assume that there is no duplicate numbers in the list. Given a list of numbers, ret 阅读全文
posted @ 2017-09-28 05:47 Review->Improve 阅读(159) 评论(0) 推荐(0)
摘要:Given a 2D board containing 'X' and 'O', capture all regions surrounded by 'X'. A region is captured by flipping all 'O''s into 'X''s in that surround 阅读全文
posted @ 2017-09-27 06:42 Review->Improve 阅读(235) 评论(0) 推荐(0)
摘要:A non-negative numbers can be regarded as product of its factors.Write a function that takes an integer n and return all possible combinations of its 阅读全文
posted @ 2017-09-26 13:49 Review->Improve 阅读(563) 评论(0) 推荐(0)
摘要:You are given a m x n 2D grid initialized with these three possible values. -1 - A wall or an obstacle.0 - A gate.INF - Infinity means an empty room. 阅读全文
posted @ 2017-09-26 12:31 Review->Improve 阅读(516) 评论(0) 推荐(0)
摘要:Given a set of n nuts of different sizes and n bolts of different sizes. There is a one-one mapping between nuts and bolts. Comparison of a nut to ano 阅读全文
posted @ 2017-09-25 14:01 Review->Improve 阅读(531) 评论(0) 推荐(0)
摘要:The code base version is an integer start from 1 to n. One day, someone committed a bad version in the code case, so it caused this version and the fo 阅读全文
posted @ 2017-09-15 06:29 Review->Improve 阅读(143) 评论(0) 推荐(0)
摘要:Calculate the (a^n) % b where a, b and n are all 32bit integers. Calculate the (a^n) % b where a, b and n are all 32bit integers. Calculate the (a^n) 阅读全文
posted @ 2017-09-15 05:58 Review->Improve 阅读(226) 评论(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 @ 2017-09-08 12:20 Review->Improve 阅读(149) 评论(0) 推荐(0)
摘要:Given a binary search tree (See Definition) and a node in it, find the in-order successor of that node in the BST. If the given node has no in-order s 阅读全文
posted @ 2017-09-08 12:15 Review->Improve 阅读(342) 评论(0) 推荐(0)
摘要:Given a binary tree where all the right nodes are either leaf nodes with a sibling (a left node that shares the same parent node) or empty, flip it up 阅读全文
posted @ 2017-09-07 11:01 Review->Improve 阅读(291) 评论(0) 推荐(0)
摘要:Given a binary tree, collect a tree's nodes as if you were doing this: Collect and remove all leaves, repeat until the tree is empty. Have you met thi 阅读全文
posted @ 2017-09-07 06:12 Review->Improve 阅读(266) 评论(0) 推荐(0)
摘要:Given a binary tree, return the vertical order traversal of its nodes' values. (ie, from top to bottom, column by column). If two nodes are in the sam 阅读全文
posted @ 2017-09-07 04:48 Review->Improve 阅读(352) 评论(0) 推荐(0)
摘要:Given a Binary Search Tree (BST), convert it to a Greater Tree such that every key of the original BST is changed to the original key plus sum of all 阅读全文
posted @ 2017-09-07 01:56 Review->Improve 阅读(141) 评论(0) 推荐(0)
摘要:Given a 2D matrix of 0s and 1s, find maximum size rectangle of all 1s in this matrix. Brute force solution is very inefficient. A better solution is t 阅读全文
posted @ 2017-09-05 13:17 Review->Improve 阅读(206) 评论(0) 推荐(0)
摘要:You are given n pairs of numbers. In every pair, the first number is always smaller than the second number. A pair (c, d) can follow another pair (a, 阅读全文
posted @ 2017-09-05 09:13 Review->Improve 阅读(541) 评论(0) 推荐(0)
摘要:Same Problem Link. [LintCode] Regular Expression Matching 阅读全文
posted @ 2017-08-28 09:29 Review->Improve 阅读(134) 评论(0) 推荐(0)
摘要:Same Problem Link. [LintCode] Wildcard Matching 阅读全文
posted @ 2017-08-28 09:28 Review->Improve 阅读(95) 评论(0) 推荐(0)
摘要:Given a string s, cut s into some substrings such that every substring is a palindrome. Return the minimum cuts needed for a palindrome partitioning o 阅读全文
posted @ 2017-08-26 11:20 Review->Improve 阅读(435) 评论(0) 推荐(0)
摘要:Given a string and a dictionary, return true if the string can be split into multiple words such that each word is in dictionary. If not return false. 阅读全文
posted @ 2017-08-26 07:19 Review->Improve 阅读(152) 评论(0) 推荐(0)