Skip to content

Instantly share code, notes, and snippets.

@chuchao333
Last active August 29, 2015 14:16
Show Gist options
  • Save chuchao333/fb0350bd4860499eea80 to your computer and use it in GitHub Desktop.
Save chuchao333/fb0350bd4860499eea80 to your computer and use it in GitHub Desktop.
Statistics of LeetCode submissions

Binary Search

Search Insert Position: 1 CE, 1 TLE, 1 AC

Search for a Range: 1 CE, 1 WA, 1 AC, 1 AC (binary search twice)

Search in Rotated Sorted Array: 3 WA, 1 AC

Search in Rotated Sorted Array II: 2 WA, 1 TLE, 2 WA, 1 AC (sequencial search), 1 AC

Search a 2D Matrix: 1 AC

Find Peak Element: 1 CE, 1 AC

Searching a 2D Sorted Matrix: not in OJ, but an interesting problem

Array

Merge Sorted Array: 1 RE, 2 WA, 1 AC, 1 AC (insert from end to begin, more efficient)

Remove Duplicates from Sorted Array: 1 TLE, 3 WA, 3 OLE, 1 AC, 1 AC (use two pointers, while the second points to a new value)

Remove Duplicates from Sorted Array II: 1 AC, 1 AC (two pointers, similar idea as above)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment