Category: leetcode online judge
This is a leetcode puzzle: You can submit your solutions to this URL: https://leetcode.com/problems/move-zeroes/ Given an array nums, write a function to move all 0’s to the end of …
Count the number of prime numbers less than a non-negative number, n. Submit your solution to: https://leetcode.com/problems/count-primes/ Naive Solution The first solution is straightforward, a prime number is a …
Given a non-negative integer number, repeatedly add all its digits until the result has only one digit. For example: Given num = 38, the process is like: 3 + …
You are a product manager and currently leading a team to develop a new product. Unfortunately, the latest version of your product fails the quality check. Since each version …
Given a text file file.txt, transpose its content. You may assume that each row has the same number of columns and each field is separated by the ‘ ‘ …