Category: javascript
Design a HashSet without using any built-in hash table libraries. To be specific, your design should include these functions: add(value): Insert a value into the HashSet. contains(value) : Return …
Given a word, you need to judge whether the usage of capitals in it is right or not. We define the usage of capitals in a word to be …
Given an input string, reverse the string word by word. Example 1: Input: “the sky is blue” Output: “blue is sky the” Example 2: Input: ” hello world! ” …
Given an array of numbers arr. A sequence of numbers is called an arithmetic progression if the difference between any two consecutive elements is the same. Return true if …
Many questions are interesting but the answers are not obvious or easy to get. For example: Who comments most in the last 24 hours? I am going to show …