Giter VIP home page Giter VIP logo

leetcode-2's Introduction

Solution set for Leetcode online interview problems. (88/92)
http://www.leetcode.com/onlinejudge
My purpose of publishing the solution set is 
1) preparing for the technical interviews;
2) looking forward better ideas and more elegant code to solve the problem.

3 Sum: medium
3 Sum Closest: medium
4 Sum: Is there a solution that the time complexity is better than O(n^2 * lgn)?
Add Binary: medium
Add Two Numbers: easy
Anagrams: easy
Climbing Stairs: medium
Combination Sum: Is there a better way to construct the path?
Combination Sum II: Is ther a better way to construct the path?
Combinations: easy

Container With Most Water: hard
Count and Say: easy
Decode Ways: dp
Divide Two Integers: easy
Edit Distance: dp
First Missing Positive: easy
Generate Parentheses: easy
Gray Code: bit operation
Implement strStr(): easy
Insert Interval: easy

Integer to Roman: easy
Jump Game: medium
Jump Game II: medium
Largest Rectangle in Histogram: hard
Length of Last Word: easy
Letter Combinations of a Phone Number: easy
Longest Common Prefix: easy
***Longest Palindromic Substring: hard
Longest Substring Without Repeating Characters: easy
Longest Valid Parentheses: medium

Maximal Rectangle: hard
Maximum Subarray: dp
***Median of Two Sorted Arrays
Merge Intervals: easy
Merge k Sorted Lists: medium
Merge Sorted Array: medium
Merge Two Sorted Lists: easy
Minimum Path Sum: easy
Minimum Window Substring: hard
Multiply Strings: easy

N-Queens: easy
N-Queens II: dfs
Next Permutation: hard
Palindrome Number: Is there any better solution?
Partition List: medium linked list 
Permutation Sequence: medium number theory
Permutations: easy
***Permutations II: better solution than O(n! * lg(n!))?
Plus One: easy
Pow(x, n): medium how to write neat exponential steps

Regular Expression Matching: hard, boundry and logic. Better solution?
Remove Duplicates from Sorted Array: easy
Remove Duplicates from Sorted Array II: easy
Remove Duplicates from Sorted List: easy
Remove Duplicates from Sorted List II: medium
Remove Element: easy
Remove Nth Node From End of List: medium
Reverse Integer: easy
Reverse Linked List II: medium
Reverse Nodes in k-Group: medium

Roman to Integer: easy
Rotate Image: easy
Rotate List: easy
Scramble String: medium
Search a 2D Matrix: binary search, easy
Search for a Range: variant of binary search, easy
Search in Rotated Sorted Array: variant of binary search, medium
Search in Rotated Sorted Array II: variant of binary search, easy
Search Insert Position: variant of binary search, easy
Set Matrix Zeroes: easy

Simplify Path: meidum
Sort Colors: hard
Spiral Matrix: easy
Spiral Matrix II: easy
Sqrt(x): variant of binary search, medium
String to Integer (atoi): boring
Subsets: easy
***Subsets II: similar as problem Permutations II
Substring with Concatenation of All Words: hash, medium
Sudoku Solver: easy dfs

Swap Nodes in Pairs: linked list, easy
Text Justification: easy
***Trapping Rain Water: don't understand the problem
Two Sum: easy hash
Unique Paths: easy
Unique Paths II: easy
Valid Number: boring
Valid Parentheses: easy
Valid Sudoku: easy
Wildcard Matching: same as Regular Expression Matching

Word Search: easy dfs
ZigZag Conversion: easy

AFTER 10/24/2012 NEW ADDED
Interleaving String: easy dp
Convert Sorted List To Binary Search Tree: easy
Flatten Binary Tree to Linked List: medium

leetcode-2's People

Contributors

zwxxx avatar mrhuke avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.