shuaijiang's blog
  • 首页
  • 归档
  • 分类
  • 标签
  • 关于

LeetCode Sort List

DescriptionSort a linked list in O(n log n) time using constant space complexity. The original problem is here. The original code is here.
7月 13 2015
#leetcode

LeetCode Kth Smallest Element In A BST

DescriptionGiven a binary search tree, write a function kthSmallest to find the kth smallest element in it. Note:You may assume k is always valid, 1 ≤ k ≤ BST’s total elements. The original problem is
7月 13 2015
#leetcode

LeetCode Unique Paths2

DescriptionFollow up for “Unique Paths”: Now consider if some obstacles are added to the grids. How many unique paths would there be? An obstacle and empty space is marked as 1 and 0 respectively in t
7月 12 2015
#leetcode

LeetCode Implement strStr

DescriptionThe original problem is here. The original code is here.
7月 12 2015
#leetcode

LeetCode Set Matrix Zeros

DescriptionGiven a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place. The original problem is here. The original code is here.
7月 12 2015
#leetcode

LeetCode Rotate Image

DescriptionYou are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (clockwise). Follow up:Could you do this in-place? The original problem is here. The original code is
7月 12 2015
#leetcode

LeetCode Sort Colors

DescriptionGiven an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, white and blue. Here, we will use the i
7月 12 2015
#leetcode

LeetCode Best Time to Buy and Sell Stock

DescriptionSay you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most one transaction (ie, buy one and sell one share of the
7月 12 2015
#leetcode

LeetCode Unique Paths

DescriptionA robot is located at the top-left corner of a m x n grid (marked ‘Start’ in the diagram below). The robot can only move either down or right at any point in time. The robot is trying to re
7月 12 2015
#leetcode

LeetCode Convert Sorted Array to Binary Search Tree

DescriptionGiven an array where elements are sorted in ascending order, convert it to a height balanced BST. The original problem is here. The original code is here.
7月 12 2015
#leetcode
1…1314151617…26

搜索

Hexo Fluid
总访问量 次 总访客数 人