Latest Articles

House Robber Data Structures and Algorithms

House Robber

House Robber Problem You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed; the on…

climbing stairs Data Structures and Algorithms

climbing stairs

Understanding the Problem To solve the problem of climbing stairs, you can use a technique called dynamic programming. Dynamic programming is a me…

Dynamic Programming Data Structures and Algorithms

Dynamic Programming

Dynamic Programming   Dynamic Programming is an algorithmic method for solving optimization problems by breaking them(a problem or problem…

Regular Expression Matching Data Structures and Algorithms

Regular Expression Matching

Regular Expression Matching Given an input string(s) and a pattern (p), implement regular expression matching with support for '.' and &#3…

Edit Distance Data Structures and Algorithms

Edit Distance

Edit Distance   Given two strings, word1, and word2, return the minimum number of operations required to convert word1 to word2.  …

Target Sum Data Structures and Algorithms

Target Sum

Target Sum You are given an integer array nums and an integer target. You want to build an expression out of nums by adding one of the symbols …

Unique Paths Data Structures and Algorithms

Unique Paths

Unique Paths A robot is located at the top-left corner of a m*n grid(marked 'Start' in the diagram below). The robot can only move eith…

Maximum Product Subarray Data Structures and Algorithms

Maximum Product Subarray

Maximum Product Subarray Given an integer array nums, find the contiguous subarray within an array(containing at least one number) which has the l…

Partition Equal Subset Sum Data Structures and Algorithms

Partition Equal Subset Sum

Problem: Partition Equal Subset Sum Given a non-empty array nums containing only positive integers, find if the array can be partitioned into two …

Word Break Data Structures and Algorithms

Word Break

Word Break: Problem Given a string s and a dictionary of strings wordDict, return true if s can be segmented into a space-seperated sequence of…