TongTong Shi's Blog
A Playground to Share My Knowledge
3Sum Smaller 3Sum Smaller
LintCode Q 918 - 3Sum SmallerGiven an array of n integers nums and a target, find the number of index triplets i, j, k
2019-05-15 Tong Shi
Max Consecutive Ones II Max Consecutive Ones II
LintCode Q 883 - Max Consecutive Ones IIGiven a binary array, find the maximum number of consecutive 1s in this array i
2019-05-15 Tong Shi
Move Zeroes Move Zeroes
LeetCode Q 283 - Move ZeroesGiven an array nums, write a function to move all 0’s to the end of it while maintaining the
2019-05-14 Tong Shi
Palindrome Linked List Palindrome Linked List
LeetCode Q 234 - Palindrome Linked ListGiven a singly linked list, determine if it is a palindrome. Example 1:Input: 1-&
2019-05-14 Tong Shi
Implement strStr() Implement strStr()
LeetCode Q 28 - Implement strStr()Implement strStr(). Return the index of the first occurrence of needle in haystack, or
2019-05-14 Tong Shi
Smallest Range Smallest Range
LeetCode Q 632 - Smallest RangeYou have k lists of sorted integers in ascending order. Find the smallestrange that inclu
2019-05-14 Tong Shi
39 / 79