Posts List

JavaScript Algorithms Part 4. MAXIMUM CHARACTER

Image credits: Pixelstalks Question Write a function to return the maximum occurring character in the input string e.g., if input string is “Test” then function should return ‘t’. Note: capital letter ‘T’ and small letter ‘t’ should count as the same. In writing a function to satisfy the above question, the first thing to do is to change every input entered by the user to lower case. Let us consider the string ‘Test’, our expected result is that the letter ‘t’ should return 2, the letter ‘e’ and ‘s’ should return 1.

JavaScript Algorithms Part 3. FIZZBUZZ

JavaScript Algorithms Part 3. FIZZBUZZ Image Credits: The FizzBuzz algorithm question is one very popular algorithm problem lots of folks would have to solve, in fact, it is a very popular interview question for programmers. Question. Write a program that prints the numbers from 1 to n. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of both three and five print “FizzBuzz”

JavaScript Algorithms Part 1 PALINDROME

Image Credits: Zooglobble Welcome to the part 1 series of JavaScript Algorithms. I’m so glad to be doing this and I’m pretty sure you’re in for an amazing ride. All solution and test code for my JavaScript Algorithm Challenge can be found here: The Palindrome question is a very popular algorithm question asked during interviews and it is probably one of the first challenges you’d have to deal with when you start out as a programmer, I’d be sharing my thought process on solving this question.