My Own Notes

Saturday, June 14, 2014

LeetCode (Python): Sort List

›
Sort a linked list in  O ( n  log  n ) time using constant space complexity. Solution As we are sorted a linked list, we need that our al...

LeetCode (Python): Surrounded Regions

›
Given a 2D board containing  'X'  and  'O' , capture all regions surrounded by  'X' . A region is captured by fli...
1 comment:
Friday, June 13, 2014

LeetCode (Python): Reorder List

›
Given a singly linked list L : L 0 → L 1 →…→ L n -1 → L n , reorder it to: L 0 → L n → L 1 → L n -1 → L 2 → L n -2 →… You must do this i...

LeetCode (Python): Candy

›
There are  N  children standing in a line. Each child is assigned a rating value. You are giving candies to these children subjected to t...

LeetCode (Python): Subsets

›
Given a set of distinct integers,  S , return all possible subsets. Note: Elements in a subset must be in non-descending order. The so...

LeetCode (Python): Spiral Matrix

›
Given a matrix of  m  x  n  elements ( m  rows,  n  columns), return all elements of the matrix in spiral order. For example, Given the f...
Thursday, June 12, 2014

LeetCode (Python): Single Number II

›
Given an array of integers, every element appears three times except for one. Find that single one. Note: Your algorithm should have a...
1 comment:
‹
›
Home
View web version

About Me

Unknown
View my complete profile
Powered by Blogger.