Filter interviews by
I applied via Naukri.com and was interviewed in Mar 2022. There was 1 interview round.
Remove duplicates from array and implement Stack using Queue
To remove duplicates, use a HashSet or sort the array and iterate through it
To implement Stack using Queue, use two Queues and switch elements between them
Example: String[] arr = {"apple", "banana", "orange", "apple"};
Example: Queue
Example: Stack
I applied via Referral and was interviewed before Sep 2020. There were 3 interview rounds.
I applied via Company Website and was interviewed in Jul 2024. There was 1 interview round.
I m to get yourlife company to work.
It's like technical round & Hr round , way of language speaking.
I applied via Walk-in and was interviewed before Nov 2022. There were 3 interview rounds.
Java is a versatile programming language used for developing a wide range of applications.
Java is used for developing web applications, mobile apps, desktop applications, and enterprise software.
It is commonly used in backend development for server-side programming.
Java is also used in game development, scientific applications, and big data processing.
Examples include Android apps, banking software, e-commerce platform
Coding of java how to solve eassy quations
Learn fundamentals, masted dsa and oop. after create 2 professional projects
I applied via Referral and was interviewed in Apr 2024. There was 1 interview round.
Codesignal Round : Implementation based 4 questions. Solved 2.5
I applied via Recruitment Consulltant and was interviewed before Jan 2023. There were 2 interview rounds.
I was interviewed in Jul 2021.
Round duration - 60 minutes
Round difficulty - Easy
Easy level DSA questions were asked to implement.
Given an undirected and disconnected graph G(V, E) where V vertices are numbered from 0 to V-1, and E represents edges, your task is to output the BFS traversal starting from the ...
BFS is a traversing algorithm we start traversing from a selected node (starting node) and traverse the graph layer wise thus exploring the neighbor nodes (nodes which are directly connected to source node). And then move towards the next-level neighbor nodes.
Pseudocode :
BFS (G, s)
Q.push( s ) //Inserting s in queue Q until all its neighbor vertices are marked.
mark s as visited.
while ( Q is not empty)
//Removing th...
Given an undirected and disconnected graph G(V, E)
, where V
is the number of vertices and E
is the number of edges, the connections between vertices are provided in the 'GR...
The DFS algorithm is a recursive algorithm based on the idea of backtracking. It starts with the initial node of the graph G, and then goes to deeper and deeper until we find the goal node or the node which has no children.
Pseudocode :
DFS(G, s):
mark s as visited
for all neighbors v of s in Graph G:
if v is not visited:
DFS-recursive(G, v)
Calculate the Nth term in the Fibonacci sequence, where the sequence is defined as follows: F(n) = F(n-1) + F(n-2)
, with initial conditions F(1) = F(2) = 1
.
The recursive approach involves direct implementation of mathematical recurrence formula.
F(n) = F(n-1)+F(n-2)
Pseudocode :
fibonacci(n):
if(n<=1)
return n;
return fibonacci(n-1) + fibonacci(n-2)
This is an exponential approach.
It can be optimized using dynamic programming. Maintain an array that stores all the calculated fibonacci numbers so far and return the nth fibonacci number at last. This approach will t...
Round duration - 60 minutes
Round difficulty - Easy
DSA questions based on trees were asked to implement.
You are given a binary tree of integers. Your task is to determine the left view of the binary tree. The left view consists of nodes that are visible when the tree...
A level order traversal based solution can be presented here. For each level, we need to print the first node i.e. the leftmost node of that level.
Steps :
1. Make a queue of node type and push the root node in the queue.
2. While the queue is not empty, do :
2.1 Determine the current size of the queue.
2.2 Run a for loop to traverse all nodes of the current level and do :
2.2.1 Remove the topmost node from the q...
Given a binary tree of integers, your task is to output the right view of the tree.
The right view of a binary tree includes the nodes that are visible when the tree is observed...
BFS can be used to solve this question.
Steps :
1. Traverse the whole tree in level order fashion using BFS along with storing the last processed node (curr).
2. Keep a tag at the end of each level to know that a particular level has ended.
3. Whenever a level ends store the last processed node value to the resultant list.
Time Complexity : O(n) [ Since, each node is traversed exactly once ]
Space Complexity : O(w) [ 'w' is
You are provided with the Inorder and Level Order traversals of a Binary Tree composed of integers. Your goal is to determine the height of this Binary Tree without actually construc...
This problem can be solved using recursion. Recursively calculate height of left and right subtrees for each node node and assign height to the node as max of the heights of two children plus 1
Algorithm :
height()
1. If tree is empty , return -1
2. Else
(a) Get the height of left subtree recursively i.e. call height( tree->left-subtree)
(a) Get the height of right subtree recursively i.e. call height( tree->right-subt...
Round duration - 30 minutes
Round difficulty - Easy
Typical HR round where the interviewer asked questions to know more about me.
Tip 1 : Learn DS, SQL for the interview as it will be ask and be confident about what you are saying
Tip 2 : Go through all the previous interview experiences from Codestudio and Leetcode.
Tip 3 : Do at-least 2 good projects and you must know every bit of them.
Tip 1 : Have at-least 2 good projects explained in short with all important points covered.
Tip 2 : Every skill must be mentioned.
Tip 3 : Focus on skills, projects and experiences more.
I applied via campus placement at National Institute of Technology (NIT), Silchar and was interviewed before Feb 2023. There were 2 interview rounds.
Asked a Question about Trees
based on 5 reviews
Rating in categories
Senior Software Engineer
147
salaries
| ₹11 L/yr - ₹39 L/yr |
Product Manager
109
salaries
| ₹12.9 L/yr - ₹36.8 L/yr |
Software Developer
94
salaries
| ₹6 L/yr - ₹23.5 L/yr |
Manager
79
salaries
| ₹7.5 L/yr - ₹30 L/yr |
Software Engineer
65
salaries
| ₹5.4 L/yr - ₹24 L/yr |
Info Edge
Network 18
Times Group
INDIA TODAY GROUP