随笔分类 -  Coding Made Simple

Lectures by Tushar Roy on Youtube.
摘要:Given a 2D matrix of integers, find maximum sum rectangle in this matrix. Brute force solution of enumerating all possible submatrix then check their 阅读全文
posted @ 2017-09-05 15:04 Review->Improve 阅读(611) 评论(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)
摘要:Given an array of length n that stores a stock's price in n consecutive days, Buy/Sell stock with at most K transactions to maximize profit. You must 阅读全文
posted @ 2017-08-29 13:45 Review->Improve 阅读(432) 评论(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)
摘要:Same Problem Link. [LintCode] Regular Expression Matching 阅读全文
posted @ 2017-08-28 09:29 Review->Improve 阅读(133) 评论(0) 推荐(0)
摘要:Same Problem Link. [LintCode] Wildcard Matching 阅读全文
posted @ 2017-08-28 09:28 Review->Improve 阅读(95) 评论(0) 推荐(0)
摘要:N pots, each with some number of gold coins, are arranged in a line. You are playing a game against another player. You take turns picking a pot of go 阅读全文
posted @ 2017-08-28 05:14 Review->Improve 阅读(872) 评论(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 阅读(151) 评论(0) 推荐(0)
摘要:Given a 2 dimensional matrix, find minimum cost path to reach bottom right from top left provided you can only from down and right. For a 5 * 5 matrix 阅读全文
posted @ 2017-08-26 06:47 Review->Improve 阅读(228) 评论(0) 推荐(0)
摘要:Given a string, how many minimum splits would it take so that each partition after split is a palindrome. Same Problem Link [LintCode] Palindrome Part 阅读全文
posted @ 2017-08-26 04:56 Review->Improve 阅读(112) 评论(0) 推荐(0)
摘要:Given two strings and operations edit, delete and add, how many minimum operations would it take to convert one string to another string. Same Problem 阅读全文
posted @ 2017-08-26 03:02 Review->Improve 阅读(101) 评论(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 阅读(238) 评论(0) 推荐(0)
摘要:Given boxes of different dimensions, stack them on top of each other to get maximum height such that box on top has strictly less length and width tha 阅读全文
posted @ 2017-08-25 12:17 Review->Improve 阅读(402) 评论(0) 推荐(0)
摘要:Given an array, find maximum sum increasing subsequence in this array. Solution 1. Recursion For arr[0....n], the max sum increasing subsequence can b 阅读全文
posted @ 2017-08-25 05:55 Review->Improve 阅读(235) 评论(0) 推荐(0)
摘要:Given a string, find longest palindromic subsequence in this string. lps[start, end] = lps[start + 1, end - 1] + 2, if s.charAt(start) == s.charAt(end 阅读全文
posted @ 2017-08-24 13:28 Review->Improve 阅读(190) 评论(0) 推荐(0)
摘要:Given an array, find the longest increasing subsequence in this array. The same problem link. [LintCode] Longest Increasing Subsequence Related Proble 阅读全文
posted @ 2017-08-24 06:43 Review->Improve 阅读(127) 评论(0) 推荐(0)
摘要:Given an array, find minimum number to jumps to reach end of array, given you can jump at max as much as value at position in array. The same problem 阅读全文
posted @ 2017-08-24 06:39 Review->Improve 阅读(209) 评论(0) 推荐(0)
摘要:Given three strings, return true if third string is interleaving of first and second string. By running some examples, it seems that as long as s1.len 阅读全文
posted @ 2017-08-23 12:09 Review->Improve 阅读(240) 评论(0) 推荐(0)
摘要:Given a matrix of 0s and 1s. Find biggest sub-square matrix entirely of 1s in this matrix. The same problem link is as follows. Maximal Square 阅读全文
posted @ 2017-08-23 09:50 Review->Improve 阅读(142) 评论(0) 推荐(0)