TO THE NEW interview experience Real time questions & tips from candidates to crack your interview

Java Developer

TO THE NEW
upvote
share-icon
2 rounds | 5 Coding problems

Interview preparation journey

expand-icon
Journey
In my second year, I took the competitive programming course from Coding Ninjas, which helped me dive deep into DSA, and then I started practicing problems on CodeStudio.
Application story
It was an on-campus drive. They were hiring for two roles: the first one as a Java developer and the second one as an iOS developer. Round 1: Coding + Aptitude, Round 2: 1 Tech interview, Round 3: 1 HR round
Why selected/rejected for the role?
I was rejected in the technical interview round because I did not know DBMS in depth. For this role, you should know the theory concept in depth.
Preparation
Duration: 3 months
Topics: Dynamic Programming, Graph, DSA, OS, Networking
Tip
Tip

Tip 1: DSA
Tip 2: CS Fundamentals (OOPS, DBMS)

Application process
Where: Campus
Eligibility: 60% throughout.
Resume Tip
Resume tip

Tip 1: Good Projects
Tip 2: Do not put the wrong things on your resume.

Interview rounds

01
Round
Medium
Online Coding Interview
Duration60 minutes
Interview date22 Nov 2022
Coding problem2

The first round was the aptitude and technical round. The test consisted of English, logical reasoning, and quantitative aptitude.

1. Technical Questions

  • Which of the following is the brain of the computer? (Learn)
  • Which of the following is a technique that marked the beginning of computer communication?

2. Reverse Words In A String

Easy
10m average time
90% success
0/40
Asked in companies
UnacademyIBMOptum

You are given a string 'str' of length 'N'.


Your task is to reverse the original string word by word.


There can be multiple spaces between two words and there can be leading or trailing spaces but in the output reversed string you need to put a single space between two words, and your reversed string should not contain leading or trailing spaces.


Example :
If the given input string is "Welcome to Coding Ninjas", then you should return "Ninjas Coding to Welcome" as the reversed string has only a single space between two words and there is no leading or trailing space.
Try solving now
02
Round
Medium
Video Call
Duration90 minutes
Interview date25 Nov 2022
Coding problem3

It consists of 3 coding questions: 2 are easy, and 1 is of medium to hard level.

1. M - Coloring Problem

Easy
15m average time
85% success
0/40
Asked in companies
UberSamsungSquadstack

You are given an undirected graph with N nodes in the form of an adjacency matrix. You are also given an integer M.

Your task is to find if you can color the vertices of the graph using at most M colors such that no two adjacent vertices are of the same color.

For example:

If the given adjacency matrix is:
[0 1 0]
[1 0 1]
[0 1 0] and M = 3.

The given adjacency matrix tells us that node 1 is connected to node 2 and node 2 is connected to node 3. 

So if we color vertex 1 with ‘red’, vertex 2 with ‘blue’, and vertex 3 with ‘red’, it is possible to color the given graph with two colors which is less than or equal to M.
Try solving now

2. Middle Of Linked List

Easy
20m average time
80% success
0/40
Asked in companies
NoBrokerIBMHCL Technologies

Given a singly linked list of 'N' nodes. The objective is to determine the middle node of a singly linked list. However, if the list has an even number of nodes, we return the second middle node.

Note:
1. If the list is empty, the function immediately returns None because there is no middle node to find.
2. If the list has only one node, then the only node in the list is trivially the middle node, and the function returns that node.
Problem approach

When traversing the list with a slow pointer, create another pointer, fast, that traverses twice as fast. When fast reaches the end of the list, slow must be in the middle.

Try solving now

3. Search In Rotated Sorted Array

Moderate
30m average time
65% success
0/80
Asked in companies
FreshworksExpedia GroupPayPal

Aahad and Harshit always have fun by solving problems. Harshit took a sorted array consisting of distinct integers and rotated it clockwise by an unknown amount. For example, he took a sorted array = [1, 2, 3, 4, 5] and if he rotates it by 2, then the array becomes: [4, 5, 1, 2, 3].

After rotating a sorted array, Aahad needs to answer Q queries asked by Harshit, each of them is described by one integer Q[i]. which Harshit wanted him to search in the array. For each query, if he found it, he had to shout the index of the number, otherwise, he had to shout -1.

For each query, you have to complete the given method where 'key' denotes Q[i]. If the key exists in the array, return the index of the 'key', otherwise, return -1.

Note:

Can you solve each query in O(logN) ?
Try solving now

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

What is recursion?

Choose another skill to practice
Similar interview experiences
Trainee Technology
3 rounds | 4 problems
Interviewed by TO THE NEW
1063 views
0 comments
0 upvotes
Fullstack Developer
3 rounds | 3 problems
Interviewed by TO THE NEW
1017 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 7 problems
Interviewed by OYO
4657 views
0 comments
0 upvotes
company logo
SDE - 1
3 rounds | 9 problems
Interviewed by Salesforce
3451 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
Java Developer
3 rounds | 20 problems
Interviewed by Ernst & Young (EY)
9061 views
2 comments
0 upvotes
company logo
Java Developer
2 rounds | 2 problems
Interviewed by HCL Technologies
7165 views
0 comments
0 upvotes