Full Stack Developer
100+ Full Stack Developer Interview Questions and Answers for Freshers
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
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
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
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
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
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
Share interview questions and help millions of jobseekers 🌟
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
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
Full Stack Developer Jobs
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
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
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
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
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
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
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.
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
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
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
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
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.
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
You are given a positive integer ‘N’. The task is to find and return the smallest number, ‘M’, such that the multiplication of all the digits in ‘M’ is equal to...read more
You are given a matrix of ‘M’ rows and ‘N’ columns. The cells of the matrix contain either a coin or are empty.
You are allowed to visit every boundary cell that has a coin in it ...read more
You have been given an undirected graph with 'N' vertices and 'M' edges. The vertices are labelled from 1 to 'N'.
Your task is to find if the graph contains a cycle or not.
A ...read more
You have been given a binary tree of integers. You are supposed to find the left view of the binary tree. The left view of a binary tree is the set of all nodes that are visible when t...read more
Implement a queue data structure which follows FIFO(First In First Out) property, using only the instances of the stack data structure.
Note:
1. To implement means you need to complete some pre...read more
You are Harshad Mehta’s friend. He told you the price of a particular stock for the next ‘N’ days. You can either buy or sell a stock. Also, you can only complete at most 2-transactions. Find ...read more
A Directed Acyclic Graph (DAG) is a directed graph that contains no cycles.
Topological Sorting of DAG is a linear ordering of vertices such that for every directed edge from vertex ‘u’ to verte...read more
For a given array/list of integers of size N, print the Next Greater Element(NGE) for every element. The Next Greater Element for an element X is the first element on the right side of X in ...read more
Alex has a computer with ‘K’ memory spaces. He has a list of ‘N’ different document downloads that he would like to do, each of which consumes some unique memory usage. He also has ‘M’ comp...read more
Given a sequence of numbers ‘ARR’. Your task is to return a sorted sequence of ‘ARR’ in non-descending order with help of the merge sort algorithm.
Example :
Merge Sort Algorithm - Merge sort is a Div...read more
You are given an integer array 'ARR' of size 'N' and an integer 'S'. Your task is to return the list of all pairs of elements such that each sum of elements of each pair equals 'S'.
Note:
Each pair shou...read more
You are given two strings named str1 and str2 of length N and M respectively. Find whether string str2 contains one of the permutations of string str1 as its substring. In other words, whet...read more
You are given two strings BEGIN and END and an array of strings DICT. Your task is to find the length of the shortest transformation sequence from BEGIN to END such that in every transformation you c...read more
You are given an array/list ARR consisting of N integers. Your task is to find the maximum possible sum of a non-empty subarray(contagious) of this array.
Note: An array C is a subarray of a...read more
You have been given an array 'ARR' of 'N' distinct elements.
Your task is to find the minimum no. of swaps required to sort the array.
For example:
For the given...read more
You have been given a binary tree of integers with N number of nodes. Your task is to check if that input tree is a BST (Binary Search Tree) or not.
A binary search tree (BST) is a binary tree data ...read more
Write a program to count and print the total number of characters (lowercase english alphabets only), digits (0 to 9) and white spaces (single space, tab i.e. '\t' and newline i.e. '\n') entered...read more
Bob lives with his wife in a city named Berland. Bob is a good husband, so he goes out with his wife every Friday to ‘Arcade’ mall.
‘Arcade’ is a very famous mall in Berland. It has a very unique t...read more
This question asks for the minimum number of trampoline jumps a person needs to make in order to reach the last shop in a mall.
The shops in the mall are laid out in a straight line and each shop has a constant value representing the maximum distance it can be jumped to.
The person starts at shop 0 and wants to reach the last shop, shop N-1.
If it is impossible to reach the last shop, the function should return -1.
The function should take the number of test cases, the number of ...read more
You have been given an integer array/list(arr) and a number 'Sum'. Find and return the total number of pairs in the array/list which when added, results equal to the 'Sum'.
Note:
G...read more
You have been given a non-empty grid ‘MAT’ with 'N' rows and 'M' columns consisting of only 0s and 1s. All the rows are sorted in ascending order.
Your task is to find the index of the row t...read more
You have been given a binary matrix of size 'N' * 'M' where each element is either 0 or 1. You are also given a source and a destination cell, both of them lie within the matrix....read more
You are given an array 'ARR' consisting of 'N' elements, and you need to find the maximum value of sum(i * ARR[i]) among all possible rotation...read more
Given a string, determine if it is a palindrome, considering only alphanumeric characters.
Palindrome
A palindrome is a word, number, phrase, or other sequences of characters which read the sam...read more
You have a robot currently standing at the origin (0, 0) of a two-dimensional grid and facing north direction. You are given a sequence of moves for the robot in the form of a string of size 'N'. Y...read more
You are given 'N' rectangular buildings in a 2-dimensional city. Your task is to compute the skyline of these buildings, eliminating hidden lines return the skyline formed by these buildings ...read more
You have been given a board where there are '2' rows and 'N' columns. You have an infinite supply of 2x1 tiles, and you can place a tile in the following ways:
1. Horizontally as 1x2 tile 2. Verti...read more
Given the head node of the singly linked list, return a pointer pointing to the middle of the linked list.
If there are an odd number of elements, return the middle element if there are eve...read more
You are given an integer array with N elements. Your task is to build a max binary heap from the array.
A max-heap is a complete binary tree in which the value of each internal node is greater than or...read more
You have been given a Binary Search Tree of integers with ‘N’ nodes. You are also given data of a node of this tree. Your task is to delete the given node from the BST.
A binary search tree (B...read more
There are ‘N’ junctions connected by ‘M’ bi-directional roads. At most, one road is present between any pair of junctions. There is no road connecting a junction to itself. The travel time for a roa...read more
You have been given a sorted (lexical order) dictionary of an alien language. Write a function that finds the order of characters in the alien language. This dictionary will be given to you in t...read more
Interview Questions of Similar Designations
Top Interview Questions for Full Stack Developer Related Skills
Interview experiences of popular companies
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
Reviews
Interviews
Salaries
Users/Month