LeetCode

The solution of problem in LeetCode

LeetCode Digest - Random Pick Series

LeetCode Digest - Random Pick Series

398. Random Pick Index Given an array of integers with possible duplicates, randomly output the index of a given target number. You can assume that the given target number must exist in the

LeetCode Digest - Move Zeroes

283. Move Zeroes Problem Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero elements. For example, given nums

LeetCode Digest - Reverse Integer

7. Reverse Integer Problem: Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321 Have you thought about this? Here are some good questions to ask before coding.