Full Stack Developer

700+ Full Stack Developer Interview Questions and Answers

Updated 16 Dec 2024

Popular Companies

search-icon
Q1. Query And Matrix

You are given a binary matrix with ‘M’ rows and ‘N’ columns initially consisting of all 0s. 'Q' queries follow. The queries can be of 4 types:

Query 1: 1 R index Query 2: 1 C index Query 3: 2 R ...read more
Q2. SQL Questions

You are given the details of retail outlet. Your task is to analyze the data from the provided relations and write an SQL query to display the names and number of distinct locations where the retai...read more

Full Stack Developer Interview Questions and Answers for Freshers

illustration image
Q3. Find Duplicates In Array

You are given an array/list 'ARR' consisting of N integers, which contains elements only in the range 0 to N - 1. Some of the elements may be repeated in 'ARR'. Your task is to find all ...read more

Ans.

The task is to find all duplicate elements in an array of integers.

  • Iterate through the array and keep track of the count of each element using a hashmap.

  • Return all elements from the hashmap with count greater than 1 as the duplicate elements.

Frequently asked in,
Q4. Most Frequent Word

You are given a paragraph that may have letters both in lowercase and uppercase, spaces, and punctuation. You have also given a list of banned words. Now your task is to find the most frequent...read more

Are these interview questions helpful?
Q5. Count with K different characters

You are given a string ‘STR’ of lowercase alphabets and an integer K. Your task is to count all the possible substrings that are not necessarily distinct but should have exactly...read more

Q6. Tower of Hanoi

You are given three rods (numbered 1 to 3), and ‘N’ disks initially placed on the first rod, one on top of each other in increasing order of size ( the largest disk is at the bottom). You are supp...read more

Share interview questions and help millions of jobseekers 🌟

man-with-laptop
Q7. Maximum difference

You are given an array 'ARR' of the 'N' element. Your task is to find the maximum difference between any of the two elements from 'ARR'.

If the maximum difference is even print “EVEN” without ...read more

Q8. LCA Of Binary Tree

You have been given a Binary Tree of distinct integers and two nodes ‘X’ and ‘Y’. You are supposed to return the LCA (Lowest Common Ancestor) of ‘X’ and ‘Y’.

The LCA of ‘X’ and ‘Y’ in the bina...read more

Full Stack Developer Jobs

IT SAP Full Stack Developer 6-10 years
SAP India Pvt.Ltd
4.2
Bangalore / Bengaluru
Full Stack Developer - 3-6 years 3-6 years
SAP India Pvt.Ltd
4.2
Bangalore / Bengaluru
Full Stack Developer 10-15 years
IBM India Pvt. Limited
4.1
Kochi
Q9. Count Set Bits

You are given a positive integer ‘N’. Your task is to find the total number of ‘1’ in the binary representation of all the numbers from 1 to N.

Since the count of ‘1’ can be huge, you are required...read more

Q10. Friends Pairing Problem

You are given an integer ‘N’, which denotes there are ‘N’ friends. You are supposed to form some pairs them satisfying the following conditions:

1. Each friend can be paired with some oth...read more

Q11. Reverse Linked List

Given a singly linked list of integers. Your task is to return the head of the reversed linked list.

For example:
The given linked list is 1 -> 2 -> 3 -> 4-> NULL. Then the reverse linked lis...read more
Frequently asked in, ,
Q12. Distinct Strings With Odd and Even Swapping Allowed

You are given an array of strings. Your task is to find the number of unique strings.

A string is considered unique if it cannot be formed from any other strin...read more

Q13. Minimum Operations

You are given an array 'ARR' of 'N' positive integers. You need to find the minimum number of operations needed to make all elements of the array equal. You can perform addition, multiplicatio...read more

Q14. Reach the destination

Given a source point (sx, sy) and a destination point (dx, dy), the task is to check if it is possible to reach the destination point using the following valid moves:

(a, b) -> (a + b, b) (...read more
Q15. Sub Sort

You are given an integer array ‘ARR’. You have to find the length of the shortest contiguous subarray such that, if you sort this subarray in ascending order, then the whole array will be sorted in asce...read more

Q16. Longest Substring Without Repeating Characters

Given a string 'S' of length 'L', return the length of the longest substring without repeating characters.

Example:

Suppose given input is "abacb", then the length ...read more
Frequently asked in,
Q17. Excel Sheet | Part-2

You are given a string STR representing the column title in an Excel Sheet. You need to find its corresponding column number.

For example: A corresponds to 1, B to 2, C to 3, … , Z to 26, AA...read more

Q18. Ways To Make Coin Change

You are given an infinite supply of coins of each of denominations D = {D0, D1, D2, D3, ...... Dn-1}. You need to figure out the total number of ways W, in which you can make a change fo...read more

Frequently asked in,
Q19. Find a Node in Linked List

You have been given a singly linked list of integers. Write a function that returns the index/position of integer data denoted by 'N' (if it exists). Return -1 otherwise.

Note :
Assume...read more
Q20. Find rank

You are given a matrix ‘ARR’ having dimensions ‘N*M’. Your task to find the rank of the matrix ‘ARR’.

The rank of a matrix is defined as:

(a) The maximum number of linearly independent column vectors i...read more
Q21. Maximum Distance

You have been given an array 'A' of N integers. You need to find the maximum value of j - i subjected to the constraint of A[i] <= A[j], where ‘i’ and ‘j’ are the indices of the array.

For examp...read more
Q22. Rearrange String

You are given a string “S”. Your task is to rearrange the characters of a string “S”, such that it does not contain any two adjacent characters which are the same.

If it is possible to rearrange...read more

Q23. Add two number as linked lists

You have been given two singly Linked Lists, where each of them represents a positive number without any leading zeros.

Your task is to add these two numbers and print the summatio...read more

Q24. Count Inversions

For a given integer array/list 'ARR' of size 'N', find the total number of 'Inversions' that may exist.

An inversion is defined for a pair of integers in the array/list when the following two co...read more

Q25. Sort 0 1 2

You have been given an integer array/list(ARR) of size 'N'. It only contains 0s, 1s and 2s. Write a solution to sort this array/list.

Note :
Try to solve the problem in 'Single Scan'. ' Single Scan' r...read more
Q26. Two Sum

You are given an array of integers 'ARR' of length 'N' and an integer Target. Your task is to return all pairs of elements such that they add up to Target.

Note:

We cannot use the element at a given inde...read more
Frequently asked in,
Q27. Relative Sorting

Given two arrays ‘ARR’ and ‘BRR’ of size ‘N’ and ‘M’ respectively. Your task is to sort the elements of ‘ARR’ in such a way that the relative order among the elements will be the same as those a...read more

Q28. LCA In A BST

You are given a binary search tree of integers with N nodes. You are also given references to two nodes P and Q from this BST.

Your task is to find the lowest common ancestor(LCA) of these two given...read more

Q29. Make Array Elements Equal

You are given an array of integers of size ‘N’. You have to make the elements of the array equal, and the cost of changing the element ‘x’ to ‘y’ is abs(x -y). Your task is to find the ...read more

Q30. Minimum Characters For Palindrome

Given a string STR of length N. The task is to return the count of minimum characters to be added at front to make the string a palindrome.

For example, for the given string “de...read more

Q31. Ninja And Alternating Largest

Ninja is given a few numbers, and he is being asked to rearrange the numbers so that every second element is greater than its left and right element.

Input Format:
The first line of...read more
Q32. Ceil from BST

Ninja is given a binary search tree and an integer. Now he is given a particular key in the tree and returns its ceil value. Can you help Ninja solve the problem?

Note:
Ceil of an integer is the cl...read more
Q33. Reverse Integer

You are given a 32-bit signed integer ‘N’. So, the integer will lie in the range [-2^31, 2^31 - 1]. Your task is to return the reverse of the given integer. If reversing causes overflow, then ret...read more

Q34. Factorial of a Number

You are given an integer ‘N’. You have to print the value of Factorial of ‘N’. The Factorial of a number ‘N’ is defined as the product of all numbers from 1 to ‘N’.

For Example:
Consider if...read more
Q35. Find Indices For Local Minimas and Maximas

Given an array “arr” of “N” integers. Your task is to find and return all the indices of local minima and local maxima in the given array. You need to return the indice...read more

Ans.

The task is to find and return the indices of local minima and local maxima in the given array.

  • Iterate through the array and compare each element with its neighbors to determine if it is a local minima or maxima.

  • Consider corner elements separately by comparing them with only one neighbor.

  • Store the indices of local minima and maxima in separate lists.

  • If there are no local minima or maxima, return -1 as the only row element in the 2-D list.

Q36. LRU Cache Implementation

Design and implement a data structure for Least Recently Used (LRU) cache to support the following operations:

1. get(key) - Return the value of the key if the key exists in the cache, o...read more
Frequently asked in,
Q37. Anagram Pairs

Pre-requisites: Anagrams are defined as words or names that can be formed by rearranging letters of another word. Such as "spar" can be formed by rearranging letters of "rasp". Hence, "spar" and "r...read more

Q38. Count Ways To Reach The N-th Stairs

You have been given a number of stairs. Initially, you are at the 0th stair, and you need to reach the Nth stair. Each time you can either climb one step or two steps. You are...read more

Ans.

The task is to find the number of distinct ways to climb from the 0th step to the Nth step, where each time you can climb either one step or two steps.

  • Use dynamic programming to solve this problem

  • Create an array to store the number of ways to reach each step

  • Initialize the first two elements of the array as 1 and 2

  • For each subsequent step, the number of ways to reach that step is the sum of the number of ways to reach the previous two steps

  • Return the number of ways to reach th...read more

Frequently asked in, ,
Q39. Find Duplicate in Array

You are given an array of integers 'ARR' containing N elements. Each integer is in the range [1, N-1], with exactly one element repeated in the array.

Your task is to find the duplicate e...read more

Q40. Longest Common Prefix

You are given an array ‘ARR’ consisting of ‘N’ strings. Your task is to find the longest common prefix among all these strings. If there is no common prefix, you have to return an empty str...read more

Q41. Maximum Consecutive Ones

Given a binary array 'ARR' of size 'N', your task is to find the longest sequence of continuous 1’s that can be formed by replacing at-most 'K' zeroes by ones. Return the length of this ...read more

Q42. Rotate matrix by 90 degrees

You are given a square matrix of non-negative integers 'MATRIX'. Your task is to rotate that array by 90 degrees in an anti-clockwise direction using constant extra space.

For example...read more

Q43. Subtree of Another Tree

Given two binary trees T and S, check whether tree S has exactly the same structure and node values with a subtree of T, i.e., check if tree S is a subtree of the tree T.

A subtree of a t...read more

Q44. Check If One String Is A Rotation Of Another String

You are given two Strings 'P' and 'Q' of equal length. Your task is to check whether String 'P' can be converted into String 'Q' by cyclically rotating it to t...read more

Ans.

The task is to check if one string can be converted into another string by cyclically rotating it to the right any number of times.

  • Check if the lengths of the two strings are equal. If not, return 0.

  • Concatenate the first string with itself and check if the second string is a substring of the concatenated string.

  • If the second string is a substring, return 1. Otherwise, return 0.

Q45. Check Permutation

For a given two strings, 'str1' and 'str2', check whether they are a permutation of each other or not.

Permutations of each other
Two strings are said to be a permutation of each other when eit...read more
Q46. N Queens

You are given an integer 'N'. For a given 'N' x 'N' chessboard, find a way to place 'N' queens such that no queen can attack any other queen on the chessboard.

A queen can be killed when it lies in the ...read more

Q47. Print array Sum

Given an array of length N, you need to find and print the sum of all elements of the array.

Input Format :
Line 1 : An Integer N i.e. size of array Line 2 : N integers which are elements of the ...read more
Q48. Third greatest element

Given an array/list 'ARR' of ‘N’ distinct integers, you are supposed to find the third largest element in the given array 'ARR'.

Input Format :
The first line contains a single integer ‘T’...read more

Q49. what steps do you take to ensure accurate estimates the project?

Ans.

To ensure accurate project estimates, I follow a structured approach that includes analyzing requirements, breaking down tasks, and considering potential risks.

  • Analyze project requirements thoroughly

  • Break down tasks into smaller, manageable chunks

  • Consider potential risks and challenges

  • Use historical data to inform estimates

  • Collaborate with team members to validate estimates

Q50. Number of Islands II

You have a 2D grid of ‘N’ rows and ‘M’ columns which are initially filled with water. You are given ‘Q’ queries each consisting of two integers ‘X’ and ‘Y’ and in each query operation, you h...read more

1
2
3
4
5
6
7
Next
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Interview experiences of popular companies

3.7
 • 10k Interviews
3.9
 • 7.8k Interviews
3.8
 • 5.4k Interviews
3.8
 • 4.6k Interviews
3.6
 • 2.3k Interviews
4.1
 • 2.3k Interviews
3.3
 • 737 Interviews
4.0
 • 248 Interviews
4.0
 • 41 Interviews
View all

Calculate your in-hand salary

Confused about how your in-hand salary is calculated? Enter your annual salary (CTC) and get your in-hand salary

Full Stack Developer Interview Questions
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+

Reviews

4 L+

Interviews

4 Cr+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter