javascript_coding_questions_complete
javascript_coding_questions_complete
This document contains 100 essential JavaScript machine coding questions frequently asked in
fresher interviews. The questions cover basic to advanced concepts, including data structures,
problem-solving, and real-world scenarios.
25. Write a function to capitalize the first letter of each word in a string.
42. Implement a function to find the nth Fibonacci number using recursion.
47. Write a function to find the longest common prefix among an array of strings.
48. Implement a function to convert an integer to a Roman numeral.
57. Write a function to compute the greatest common divisor (GCD) of two numbers.
58. Implement a function to compute the least common multiple (LCM) of two numbers.
70. Implement a function to find the largest sum of contiguous subarray (Kadanes Algorithm).
76. Implement a function to find the lowest common ancestor in a binary tree.
78. Implement a function to find the shortest path in a grid using BFS.
83. Write a function to find the maximum product of three numbers in an array.
84. Implement a function to calculate the sum of all left leaves in a binary tree.
94. Implement a function to find the shortest path in a weighted graph using Dijkstras algorithm.