0% found this document useful (0 votes)
33 views2 pages

JavaScript DSA Interview Prep Guide

The document outlines a JavaScript Data Structures and Algorithms (DSA) roadmap focused on frontend development, detailing key topics such as strings, arrays, objects, numbers, basic algorithms, and advanced JavaScript concepts. Each section includes specific problems and interview questions to practice, such as reversing strings and arrays, checking for palindromes, and implementing various sorting algorithms. Additionally, it covers ES6 features and provides a bonus section on recursion and time complexity basics.

Uploaded by

Arpit Sheoran
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views2 pages

JavaScript DSA Interview Prep Guide

The document outlines a JavaScript Data Structures and Algorithms (DSA) roadmap focused on frontend development, detailing key topics such as strings, arrays, objects, numbers, basic algorithms, and advanced JavaScript concepts. Each section includes specific problems and interview questions to practice, such as reversing strings and arrays, checking for palindromes, and implementing various sorting algorithms. Additionally, it covers ES6 features and provides a bonus section on recursion and time complexity basics.

Uploaded by

Arpit Sheoran
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

■ JavaScript DSA Roadmap with Interview

Questions (Frontend Focused)

1. Strings

• Reverse a string
• Check palindrome (e.g. madam)
• Count vowels & consonants
• Find repeated characters
• Find first non-repeated character
• Check if two strings are anagrams
• Check substring (includes/startsWith/endsWith)

2. Arrays

• Reverse an array
• Find max and min element
• Find second largest element
• Remove duplicates (loop / Set / filter)
• Merge two arrays and sort
• Rotate an array by k steps
• Find missing number in array 1…n
• Find pair with sum = target
• Find intersection of two arrays
• Flatten nested array (e.g. [1,[2,[3]]] → [1,2,3])

3. Objects / Frequency Count

• Count frequency of elements in array


• Word count in a string
• Most frequent element in array
• Group objects by a property (e.g. age, department)
• Convert object → array and vice versa

4. Numbers / Math

• Factorial of a number
• Fibonacci series
• Prime number check
• Armstrong number check (153 → 1³+5³+3³=153)
• Sum of digits (e.g. 123 → 6)
• Reverse a number (e.g. 123 → 321)

5. Basic Algorithms
• Linear search
• Binary search
• Bubble sort
• Selection sort
• Quick sort (basic idea)
• Merge sort (concept)

6. ES6 / Advanced JS

• Difference between var, let, const


• Arrow function vs normal function
• Spread & Rest operator problems
• Destructuring objects/arrays
• Promise, async/await (basic usage)
• Map, Filter, Reduce problems
• Shallow vs Deep copy
• Null vs Undefined
• == vs ===

7. Bonus (sometimes asked)

• Recursion (factorial, fibonacci)


• Time complexity basics (O(n), O(n²))
• DOM-based problems (reverse input text, word counter)

You might also like