Filter interviews by
Java 1.8 introduced several new features including lambda expressions, functional interfaces, streams, and default methods.
Lambda expressions allow you to write code in a more concise and readable way.
Functional interfaces are interfaces with a single abstract method, used for lambda expressions.
Streams provide a way to work with sequences of elements and perform operations on them.
Default methods allow interfaces to h...
Program to print elements sorted using Java 8 features
Use Stream API to sort the elements
Use lambda expressions for sorting
Use the sorted() method to sort the elements
Top trending discussions
posted on 1 Oct 2024
I applied via Approached by Company and was interviewed in Sep 2024. There was 1 interview round.
It will be a basic maths questions.
As a general topic of trend in world.
To be known for programming knowledge about us.
React is a JavaScript library for building user interfaces.
React allows for building reusable UI components
It uses a virtual DOM for efficient updates
React is declarative, making it easier to reason about code
It is widely used in web development for its performance and flexibility
Redux is a predictable state container for JavaScript apps.
Redux is a state management library for React
It helps in managing the state of the application in a predictable manner
It follows a unidirectional data flow pattern
It has three main components: store, actions, and reducers
Store holds the state of the application
Actions are plain JavaScript objects that describe what happened
Reducers specify how the application's...
Create a react app with redux
I was interviewed in Aug 2021.
Round duration - 70 minutes
Round difficulty - Medium
There were 3 problems 1 was easy and 2 were of medium types.
Given a binary tree, the task is to compute the modulus of the difference between the sum of nodes at odd levels and the sum of nodes at even levels.
The first line...
oddSum: denotes sum of nodes at odd levels, initially 0.
evenSum: denotes sum of nodes at ecen levels, initially 0.
level: the level of the current node, initially 1.
void oddEvenLevelHelper(current, oddSum, evenSum, level)
You are given a grid containing oranges where each cell of the grid can contain one of the three integer values:
The idea is very simple and naive. We will process the rotten oranges second by second. Each second, we rot all the fresh oranges that are adjacent to the already rotten oranges. The time by which there are no rotten oranges left to process will be our minimum time.
In the first traversal of the grid, we will process all the cells with value 2 (rotten oranges). We will also mark their adjacent cells ...
Round duration - 50 minutes
Round difficulty - Medium
the interviewer was very polite and straightforward, he didn't ask me to introduce myself and he directly jumps to the coding problems.
What is new about the relationship between the and tags in HTML5?
Explain Components, Modules and Services in Angular
You have a robot currently positioned at the origin (0, 0) on a two-dimensional grid, facing the north direction. You are given a sequence of moves in the form of a string ...
Initialize a variable ‘direction’ with 0 which means that the robot is initially facing towards the north.
direction: 0 -> Robot is facing towards the North
direction: 1 -> Robot is facing towards the West
direction: 2 -> Robot is facing towards the South
direction: 3 -> Robot is facing towards the West
Initialize two variables ‘x’ and ‘y’ as 0. They will represent the position ...
Round duration - 70 minutes
Round difficulty - Easy
What is a View in sql? What are the TRUNCATE, DELETE and DROP statements?
Given a square matrix 'MATRIX' of non-negative integers, rotate the matrix by 90 degrees in an anti-clockwise direction using only constant extra space.
The idea is to find the transpose of the given matrix and then reverse the columns of the transposed matrix. For example:
For the given 2D matrix:
[ [ 1, 2, 3 ],
[ 4, 5, 6 ],
[ 7, 8, 9 ] ]
After taking transpose, it will become:
[ [ 1, 4, 7 ],
[ 2, 5, 8 ],
[ 3, 6, 9 ] ]
After reversing the columns, it will ...
Given a string STR
of length N
, determine the minimum number of characters to be added to the front of the string to make it a palindrome.
The first...
Round duration - 20 minutes
Round difficulty - Easy
Tip 1 : Deep knowledge of the projects mentioned in your resume is a must.
Tip 2 : Practice as many problems as you can from leetcode.
Tip 1 : mention 1 or 2 projects in your resume.
Tip 2 : don't put false things in your resume.
I was interviewed in Jul 2021.
Round duration - 120 Minutes
Round difficulty - Medium
This was a coding round conducted from 12 PM to 2 PM and it was not proctored but we could not switch the tabs. There were 2 coding questions each of 100 marks. The MCQ had HTML,CSS, JS, SQL, Coding and aptitutude questions.
Given an integer N
, find all possible placements of N
queens on an N x N
chessboard such that no two queens threaten each other.
A queen can attack another queen if they ar...
Given a string ‘S’, your task is to rearrange its characters so that no two adjacent characters are the same. If it's possible, return any such arrangement, otherwise re...
In this approach, we will generate all the possible rearrangements of the string and check if the current string in our rearrangement does not have any two adjacent characters that are the same. If we can find any string which satisfies our criteria then we will return that string else we will return “not possible”.
We can implement the above approach by –
Round duration - 60 minutes
Round difficulty - Easy
There were two interviewers. They started by asking me to introduce myself and asked me to explain any one of my projects in my resume and after that, they asked me about the ML algorithms used in my project and about the difficulties faced. What is NaN property in JavaScript? This took around 10 minutes. They also asked 2 coding questions.
It was conducted at 10 AM on CodePair and MS Teams. Interviewers were friendly.
Given an array/list of strings STR_LIST
, group the anagrams together and return each group as a list of strings. Each group must contain strings that are anagrams of each other.
The idea behind this approach is that two or more than two strings are anagrams if and only if their sorted strings are equal. So we will use a HashMap, let’s say “anagramGroup”, where each key is a sorted string, and the key will be mapping to the list of indices from the given list of strings that form a group of anagrams. This means that if we sort the strings at those indices, we will get the ...
The task is to determine the total number of ways to pair up 'N' friends or leave some of them single, following these rules:
The idea is to solve the problem using recursion and break down the problem into different subproblems.
Let’s define NUMBER_OF_WAYS(N) as the total number of ways ‘N’ friends can be paired up or remain single.
The N-th person has two choices - either remain single or pair up with one of the other ‘N - 1’ friends.
If he remains single, then the number of possible pairings are NUMBER_OF_WAYS(N - 1) as there are (N...
Round duration - 60 Minutes
Round difficulty - Medium
There were 2 questions based on data structures, the round started from 1.15 PM .Some SQL questions like What is a Subquery? What are its types? What are UNION, MINUS and INTERSECT commands?
You are given a binary tree, and the task is to perform a vertical order traversal of the values of the nodes in the tree.
For a node at position ('X', 'Y'), th...
The intuition is to find the breadth of the tree first so that we can beforehand know the maximum horizontal distance and minimum horizontal distance of a node from the root node. We can use the absolute value of minimum horizontal distance as an offset. Now we can use an array/list visited to store the visited nodes where ith element will store the node at (i - offset”) distance horizontally from the...
You are given two integers dividend
and divisor
. Your task is to divide the integers without using multiplication, division, and modular operators. Return the quotien...
We can subtract the divisor from the dividend until the dividend is greater than the divisor. The quotient will be equal to the number of total subtractions performed.
Below is the detailed algorithm:
Round duration - 30 Minutes
Round difficulty - Easy
The round was at 7.30 PM and I was asked to introduce myself and we had basic talk on where I live and my interests. I asked about the work culture and about the role at the end.
This was basically finding a maximum number of points in a line. I coded that but he wanted an improved solution. He told me to assume the positions of balloons in a matrix where 1 represents if the balloon is present and vice versa. Then I had to find which row or column or diagonal had the maximum number of 1’s. Later he asked me if I had some questions.
Tip 1 : Practice atleast 400 questions of leetcode topics wise.
Tip 2 : Participate in hackathons.
Tip 3 : Have 2 good projects atleast and be very good in project concepts.
Tip 1 : Have good projects in your resume and have clear idea of what you have done in those.
Tip 2 : Mention languages, frameworks, subjects only when you have proper hold on them, don't mention things you don't know properly.
I applied via Campus Placement
3 coding questions
I was interviewed in Aug 2021.
Round duration - 70 minutes
Round difficulty - Medium
The test started around 3 pm and was of 70 minutes. 3 coding questions were asked which were mainly on trees and number theory.
Develop a program to compute the factorial of a given integer 'n'.
The factorial of a non-negative integer 'n', denoted as n!
, is the product of all positive integ...
Given a list of integers of size N
, your task is to determine the Next Greater Element (NGE) for every element. The Next Greater Element for an element X
is the firs...
For every element in the array, we will run a loop on its right side. As soon as we find an element on its right side which is greater than it, we will break the loop, assign it as the NGE of this element, move forward, and do the same for the next element.
Space Complexity: O(1)Explanation:O(1)
No extra space is used.
Time Complexity: O(n^2)Explanation:O(N ^ 2), Where N is the number of elements ...
Given a Binary Search Tree (BST) and an integer, write a function to return the ceil value of a particular key in the BST.
The ceil of an integer is defined as the s...
We will traverse the Binary search tree from the root node till we find the node whose key value is given, and upon getting that, we return the ceil value of it.
The steps are as follows:
Round duration - 60 minutes
Round difficulty - Medium
Interviewer was very friendly and supportive. My interview happened on google meet. What is a View? What is Denormalization? Difference between “==” and “===” operators in js.
You are given an integer array ARR
. Determine the length of the shortest contiguous subarray which, when sorted in ascending order, results in the entire array being sorted in a...
In this approach, we consider every possible subarray that can be formed from the given array ‘ARR’. For every subarray ARR[i … j] considered, we need to check whether this is the smallest unsorted subarray or not.
The algorithm is as follows:
Given an integer array arr
of size 'N' containing only 0s, 1s, and 2s, write an algorithm to sort the array.
The first line contains an integer 'T' representing the n...
Use any good sorting algorithm like Merge Sort, Quick Sort or inbuilt sorting function of different languages.
O(1), As we are using constant space.
Time Complexity: O(nlogn)Explanation:O(N*log(N)), where ‘N’ is the size of the array.
We are using inbuilt sort algorithm which has Overall Time Complexity O(N*log(N))
Round duration - 60 minutes
Round difficulty - Medium
What are some of the advantages of Angular over other frameworks?
Determine if two nodes in a binary tree are cousins. Nodes are considered cousins if they are at the same level and have different parents.
In a binary tree, e...
Round duration - 10 minutes
Round difficulty - Easy
I got a call from HR in the evening around 6:30 pm.
Tip 1 : Do prepare such questions before hand only.
Tip 2 : Speak confidently.
Tip 1 : Do remember the names of the interviewers who took your interview.
Tip 1 : Do a research before hand about what does the company do.
Tip 1 : Practice at least 350 questions to have good hold on data structures
Tip 2 : Practice at least 100 - 150 company specific coding questions.
Tip 3 : Try to give timing contests to build up your speed.
Tip 1 : Keep your resume only of 1 page
Tip 2 : Showcase your major projects on the top
I was interviewed before Mar 2021.
Round duration - 70 minutes
Round difficulty - Easy
there was some coding questions and some mcqs related to js, html, css, java and aptitude.
Given an undirected graph with V vertices and E edges, your task is to find all the bridges in this graph. A bridge is an edge that, when removed, increases the number of...
The brute force approach to find all the bridges in a given graph is to check for every edge if it is a bridge or not, by first not considering current edge is not in given graph and then checking if the vertices that it was connecting are still connected or not, using DFS(DepthFirst Search). Given below is an algorithm that will find all bridges in a graph.
Algorithm :
Mr. X is a professional robber with a plan to rob houses arranged in a circular street. Each house has a certain amount of money hidden, separated by a security system that ...
The task is to find the maximum amount of money Mr. X can rob from houses arranged in a circle without alerting the police.
The problem can be solved using dynamic programming.
Create two arrays to store the maximum amount of money robbed when considering the first house and when not considering the first house.
Iterate through the array and update the maximum amount of money robbed at each house.
The final answer will be
Tip 1 : Do 300+ questions on IB or leetcode or gfg
Tip 2 : Must do DSA course of coding ninjas for clear understanding
Tip 3 : Must complete CS subjects also
Tip 1 : not add too much things
Tip 2 : be confident that you write in CV
Interview experience
Technical Lead
1.4k
salaries
| ₹11 L/yr - ₹37 L/yr |
Specialist
549
salaries
| ₹10 L/yr - ₹29 L/yr |
Senior Associate
528
salaries
| ₹3.8 L/yr - ₹13.5 L/yr |
Senior Software Engineer
459
salaries
| ₹7 L/yr - ₹28.2 L/yr |
Professional
377
salaries
| ₹5.8 L/yr - ₹19.4 L/yr |
Global Payments
FIS
Broadridge Financial Solutions
NCR Corporation