🔹 Array – Coding Questions
1. Reverse an array without using .reverse().
2. Remove duplicates from an array.
3. Rotate an array k times to the right.
4. Find the second largest element in an array.
5. Find the intersection of two arrays.
6. Count frequency of elements in an array.
7. Flatten a nested array (e.g., [1, [2, [3]]] → [1, 2, 3]).
8. Find the missing number in an array from 1 to N.
9. Move all zeroes to the end of an array.
10. Implement your own reduce() function.
🔹 Object – Coding Questions
1. Clone an object (shallow copy).
2. Deep clone a nested object.
3. Invert keys and values of an object.
4. Count frequency of values in an array of objects.
5. Merge two objects deeply.
6. Filter object properties by value (e.g., only values > 10).
7. Convert object to array of [key, value] and back.
8. Group objects by a key (e.g., group people by city).
9. Check if two objects are deeply equal.
10. Create a function that picks specific keys from an object.
🔹 String – Coding Questions
1. Reverse a string.
2. Check if a string is a palindrome.
3. Find the first non-repeating character.
4. Count vowels and consonants.
5. Remove duplicate characters.
6. Check if two strings are anagrams.
7. Capitalize the first letter of each word.
8. Find the longest word in a sentence.
9. Compress a string (e.g., "aaabbc" → "a3b2c1").
10. Implement your own split() function.
🔹 Map/Set – Coding Questions
1. Find duplicates in an array using a Set.
2. Count word frequency using a Map.
3. Remove duplicates from an array using Set.
4. Find first repeated character using Set.
5. Implement a simple in-memory cache using Map.
6. Group strings by anagram using Map.
7. Use Map to store frequency and return top K frequent elements.
8. Create a function to memoize another function using Map.
9. Use Set to check if all characters in a string are unique.
10. Implement a frequency counter using Map for any array.
🔹 Array – More Coding Questions
11. Find all pairs in an array that sum to a target.
12. Find the longest increasing subsequence.
13. Find the majority element (element that appears > n/2 times).
14. Partition array around a pivot (e.g., quicksort step).
15. Remove elements in-place from an array (like .filter() manually).
16. Chunk an array into groups of a given size.
17. Find the kth largest element.
18. Implement .map() and .filter() manually.
19. Find subarrays with a given sum.
20. Count number of subarrays with product less than K.
🔹 Object – More Coding Questions
11. Convert nested object to flat object with dot notation keys.
12. Implement a custom [Link]() function.
13. Detect circular references in an object.
14. Serialize an object into a query string.
15. Count how many times a key appears in a deeply nested object.
16. Convert flat object to nested one (reverse of flatten).
17. Freeze all nested properties of an object (deepFreeze()).
18. Create a custom get() function (like Lodash get()).
19. Remove keys with falsy values.
20. Implement a function that renames keys of an object based on a map.
🔹 String – More Coding Questions
11. Find longest substring without repeating characters.
12. Find all permutations of a string.
13. Count the number of words in a sentence.
14. Replace all spaces in a string with %20 (URLify).
15. Convert a string to camelCase or snake_case.
16. Find the longest common prefix among an array of strings.
17. Encode and decode a string (custom logic, like run-length encoding).
18. Detect and count duplicate words in a sentence.
19. Count how many times a substring appears in a string.
20. Remove HTML tags from a string.
🔹 Map/Set – More Coding Questions
11. Track frequency of characters in real-time stream using Map.
12. Use a Set to detect cycle in a directed graph.
13. Track online users using Map with session timeout.
14. Count unique elements across multiple arrays using Set.
15. Create a frequency bucket using Map (for sorting).
16. Store complex objects as Map keys (with custom equality).
17. Remove least recently used item (build LRU cache using Map).
18. Count occurrences of nested keys using Map.
19. Group elements by custom condition using Map.
20. Count repeated elements in nested arrays using Set + Map.