For beginners getting a call for an interview is one of the most exciting experience, but these excitements get flushed once you fail in the initial rounds itself.

Any typical interview in javascript consists of a few rounds.

Phone call. Initial screening. Challenges on any coding website like Hackerrank, Hackerearth, Codechef. Onsite Interview. Offer.

Of these five rounds, the first two are not so hard as you just need to explain the interviewer your interests, your knowledge, and your capabilities.

But the third round is the gate pass for your onsite interview which can be game-changing, as now it is time to prove that you are truly capable of this role.

Yeah bring it on, I am ready!.😎.

This is what newbie feels sometimes, but hold on your are just going to be surprised 🎁.

You need to solve algorithms with all test cases to be cleared to make through this round (Also some other typical question depending upon the role you are interviewing for).

Now all the solved algorithm examples out there are either in Java, C++ or Python, But I only know javascript (Because I am a beginner)😔.

Don't worry Ant-Man is out from the Quantum realm and He is here to help you 🤷‍♂️.

Note: This list is for beginners only but others can learn from it too.

Arrays

Javascript Array Complete Reference.

Examples

How to reverse an array in javascript.

Number of subarrays with given sum k.

Find the maximum sum of products of two arrays.

Find the correct position to insert an element in the array.

Program to check if a subarray with 0 sum exits or not.

Check if an array is a palindrome in javascript.

Print all subarrays with a given sum k in an array.

Left circular rotation on an array of integers.

Right circular rotation on an array of integers.

Given an unsorted array of integers find a pair with given sum in it.

How to use array sort in javascript.

How to find elements with indexof in javascript.

Javascript get unique items from array.

String

Javascript String Complete Reference.

Example

How to reverse a string in javascript.

Reverse a string using a stack.

Reverse a string using recursion.

Count all substrings having character k.

Convert a string to uppercase in javascript.

Convert a string to lowercase in javascript.

How to find the substring in javascript.

Caesar Cipher in javascript.

Minimum characters to delete to make string anagram.

Check if two string are an anagram of each other.

Check if a string contains a substring in javascript.

Converting string to jadencase.

Check if a string has duplicate letters.

Find missing alphabets to make a string panagram.

Palindrome string.

Count number of sub-string occurrence in a string.

Stack

Implement Stack In Javascript.

Example

Reverse a stack using recursion.

Sort a stack using another stack.

Balanced parentheses.

Convert decimal to binary, octal or hex in javascript.

Queue

Queue implementation in javascript.

Example

Program to reverse a queue.

Sorting

Example

Dutch national flag problem.

Selection sort in javascript.

Searching

Example

Linear search algorithm in javascript.

BitWise

Example

Program to add two binary numbers.

Swap two numbers without temp variables.

Maths

Example

Absolute difference between diagonals of the matrix.

Program to print all the prime numbers from 1 to 100.

Find the LCM of two numbers in javascript.

Program to find the GCD of two numbers in javascript.

Find distinct ways to climb the stairs in javascript.

Maximum Collatz sequence under 1000000.

Program to print the Collatz sequence in javascript.

Program to find the nth Fibonacci in javascript.

Print all the unique 2 digit combinations of given numbers.

Convert Roman numeral to an integer.

Factorial program in javascript.

Find the largest prime factor.

Program to check the prime number.

Find all the Armstrong number between two numbers.

Check if the given number is Armstrong in javascript.

Difference between the square of the sum of numbers and sum of the square of numbers.

Form the smallest possible number from the given number.

Buggy Calculator.

Find the digital root of a given number.

Find the biggest perfect square in an array.

Misc

Example

FizzBuzz program in javascript.

I started to share the solved examples in javascript only because I failed many interviews initially.

If you feel this is a helpful resource then please share these with others who are actively interviewing.

Also, follow me on Twitter for tips and tricks to solve the coding interviews and more solved examples of Algorithms. I write 2 - 3 post weekly on my blog learnersbucket.com.