TongTong Shi's Blog
A Playground to Share My Knowledge
Counting Bits Counting Bits
LeetCode Q 338 - Counting BitsGiven a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calc
2019-04-24 Tong Shi
Coin Change Coin Change
LeetCode Q 322 - Coin ChangeYou are given coins of different denominations and a total amount of money amount. Write a f
2019-04-24 Tong Shi
Range Sum Query 2D - Immutable Range Sum Query 2D - Immutable
LeetCode Q 304 - Range Sum Query 2D - ImmutableGiven a 2D matrix matrix, find the sum of the elements inside the rectang
2019-04-24 Tong Shi
Range Sum Query - Immutable Range Sum Query - Immutable
LeetCode Q 303 - Range Sum Query - ImmutableGiven an integer array nums, find the sum of the elements between indices i
2019-04-24 Tong Shi
Android Unlock Patterns Android Unlock Patterns
LintCode Q 909 - Android Unlock PatternsGiven an Android 3x3 key lock screen and two integers m and n, where 1 ≤ m ≤ n ≤
2019-04-24 Tong Shi
Paint Fence Paint Fence
LintCode Q 514 - Paint FenceThere is a fence with n posts, each post can be painted with one of the k colors. You have t
2019-04-23 Tong Shi
57 / 79