https://leetcode.com/problems/reverse-string/description/
https://leetcode.com/problems/reverse-vowels-of-a-string/description/
https://leetcode.com/problems/rotate-array/description/
https://leetcode.com/problems/sort-colors/description/
https://leetcode.com/problems/remove-element/description/
https://leetcode.com/problems/search-insert-position/description/
https://leetcode.com/problems/move-zeroes/description/
https://leetcode.com/problems/missing-number/description/
https://leetcode.com/problems/reverse-integer/description/
https://leetcode.com/problems/search-in-rotated-sorted-array/description/
https://leetcode.com/problems/contains-duplicate/description/
https://leetcode.com/problems/find-the-duplicate-number/description/
https://leetcode.com/problems/merge-sorted-array/description/
https://leetcode.com/problems/intersection-of-two-arrays/description/
https://leetcode.com/problems/find-all-duplicates-in-an-array/description/
https://leetcode.com/problems/remove-duplicates-from-sorted-array/description/
https://leetcode.com/problems/two-sum/description/
Longest Word
Have the function LongestWord(sen) take the sen parameter being passed and return the longest word in the string.
If there are two or more words that are the same length, return the first word from the string with that length.
Ignore punctuation and assume sen will not be empty. Words may also contain numbers, for example "Hello world123 567"
Examples
Input: "fun&!! time"
Output: time
Input: "I love dogs"
Output: love
abab > 1a1b1a1b
aabbca > 2a2b1c1a
Write a function that takes n number of arrays of integers and returns an array of distinct integers
i.e the integers should appear only once among the input arrays.
Example: [1,2,3], [2,3,4], [3,4,5] => [1,5].
Note: number of arrays can be n. The function should work when inputs are increased or decreased.
count char in str
second highest element in array
remove duplicate from array
find duplicate elements in an Array
given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target.
find the Number of Vowels in a String
(function() {
var message = "hello";
console.log(message);
})();
console.log(message);
(function(){
setTimeout(()=> console.log(1),2000);
console.log(2);
setTimeout(()=> console.log(3),0);
console.log(4);
})();
for (let i = 0; i < 5; i++) {
setTimeout(() => console.log(i), 10);
}
let j = 0;
for (j = 0; j < 5; j++) {
setTimeout(() => console.log(j), 0);
}
for (var k = 0; k < 5; k++) {
setTimeout(() => console.log(k), 10);
}
var k;
for (k = 0; k < 5; k++) {
setTimeout(() => console.log(k), 0);
}
https://eishta.medium.com/javascript-tricky-questions-promises-12c1ebeff20c
https://plainenglish.io/blog/6-interview-questions-that-combine-promise-and-settimeout-34c430fc297e
- Reverse a string without using built-in methods.
- Find the first non-repeating character in a string.
- Check if two strings are anagrams.
- Implement a function to flatten a nested array.
- Find the largest sum of any contiguous subarray.
- Write a function to remove duplicates from an array.
- Implement a function to check if a number is prime.
- Create a debounce function.
- Find the missing number in an array of consecutive numbers.
- Implement a function to deep clone an object.
Using a Custom useDebounce Hook
Top comments (0)