随笔分类 -  Algorithm

上一页 1 ··· 6 7 8 9 10
摘要:Given a list of Connections, which is the Connection class (the city name at both ends of the edge and a cost between them), find some edges, connect 阅读全文
posted @ 2017-09-27 12:55 Review->Improve 阅读(1780) 评论(0) 推荐(1)
摘要: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 @ 2017-09-05 12:37 Review->Improve 阅读(308) 评论(0) 推荐(0)
摘要:Implement regular expression matching with support for '.' and '*'. '.' Matches any single character. '*' Matches zero or more of the preceding elemen 阅读全文
posted @ 2017-08-29 13:35 Review->Improve 阅读(350) 评论(0) 推荐(0)
摘要:Implement wildcard pattern matching with support for '?' and '*'. '?' Matches any single character. '*' Matches any sequence of characters (including 阅读全文
posted @ 2017-08-29 10:47 Review->Improve 阅读(254) 评论(0) 推荐(0)
摘要:Given n balloons, indexed from 0 to n-1. Each balloon is painted with a number on it represented by array nums. You are asked to burst all the balloon 阅读全文
posted @ 2017-08-28 09:09 Review->Improve 阅读(458) 评论(0) 推荐(0)
摘要:Given a sequence of words, and a limit on the number of characters that can be put in one line(line width). Put line breaks in the given sequence such 阅读全文
posted @ 2017-08-26 02:51 Review->Improve 阅读(239) 评论(0) 推荐(0)
摘要:Given a string S and a string T, count the number of distinct subsequences of T in S. A subsequence of a string is a new string which is formed from t 阅读全文
posted @ 2017-08-24 06:36 Review->Improve 阅读(182) 评论(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 mat 阅读全文
posted @ 2017-08-19 07:27 Review->Improve 阅读(227) 评论(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 阅读(1440) 评论(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)
摘要: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)
摘要:Given an unsorted integer array, find the first missing positive integer. Given an unsorted integer array, find the first missing positive integer. Gi 阅读全文
posted @ 2017-07-21 07:05 Review->Improve 阅读(466) 评论(8) 推荐(1)
摘要:Given a sequence of integers, find the longest increasing subsequence (LIS). You code should return the length of the LIS. Clarification What's the de 阅读全文
posted @ 2017-07-19 10:40 Review->Improve 阅读(250) 评论(0) 推荐(0)
摘要:Given two rectangles, find if the given two rectangles overlap or not. Notice l1: Top Left coordinate of first rectangle.r1: Bottom Right coordinate o 阅读全文
posted @ 2017-06-07 00:43 Review->Improve 阅读(614) 评论(0) 推荐(1)
摘要:There is a stone game.At the beginning of the game the player picks n piles of stones in a line. The goal is to merge the stones in one pile observing 阅读全文
posted @ 2017-06-06 09:02 Review->Improve 阅读(1267) 评论(0) 推荐(0)
摘要:Given two strings s and t, determine if they are isomorphic. Two strings are isomorphic if the characters in s can be replaced to get t. All occurrenc 阅读全文
posted @ 2017-06-05 05:35 Review->Improve 阅读(1089) 评论(0) 推荐(0)
摘要:Given a set of words without duplicates, find all word squares you can build from them. A sequence of words forms a valid word square if the kth row a 阅读全文
posted @ 2017-06-02 13:09 Review->Improve 阅读(630) 评论(0) 推荐(0)
摘要:Given an integer n, return the number of trailing zeroes in n!. Example 1: Input: 3 Output: 0 Explanation: 3! = 6, no trailing zero. Example 2: Input: 阅读全文
posted @ 2017-06-01 23:22 Review->Improve 阅读(230) 评论(0) 推荐(0)
摘要:This blog talks about using dynamic programming to solve the famous 0/1 back pack (knapsack) and its variant problems. BackPack I Given n items with s 阅读全文
posted @ 2017-06-01 12:08 Review->Improve 阅读(851) 评论(0) 推荐(0)
摘要:A message containing letters from A-Z is being encoded to numbers using the following mapping: 'A' -> 1 'B' -> 2 ... 'Z' -> 26 Given an encoded messag 阅读全文
posted @ 2017-06-01 11:58 Review->Improve 阅读(412) 评论(0) 推荐(0)

上一页 1 ··· 6 7 8 9 10