i
Oracle
Filter interviews by
A binary tree is balanced if the height of its left and right subtrees differ by at most 1.
A balanced binary tree has a smoother and faster search time than an unbalanced one.
Balancing a binary tree can be done using various algorithms like AVL tree, Red-Black tree, etc.
An example of a balanced binary tree is the AVL tree, where the heights of the left and right subtrees differ by at most 1.
Spring MVC is a framework used for building web applications in Java.
Spring MVC stands for Model-View-Controller, which is a design pattern for separating concerns in a web application.
It provides a powerful model for building flexible and loosely coupled web applications.
It integrates with other Spring frameworks like Spring Boot, Spring Security, and Spring Data.
It uses annotations to simplify configuration and ...
MVC components include Model, View, and Controller for organizing code in a web application.
Model: Represents the data and business logic of the application.
View: Represents the UI and presentation layer of the application.
Controller: Acts as an intermediary between Model and View, handling user input and updating the Model accordingly.
Example: In a web application, a user interacts with the View (UI), which sends...
Routing in MVC pattern is handled by a routing engine which maps incoming URLs to specific controller actions.
Routing is the process of matching incoming URLs to specific controller actions in the MVC pattern.
Routes are defined in a routing table which maps URLs to corresponding controller actions.
The routing engine uses the routing table to determine which controller and action should handle a particular request.
...
Java is platform independent because it compiles code into bytecode that can run on any system with a JVM, which is platform dependent due to its reliance on the underlying hardware and operating system.
Java code is compiled into bytecode, which can run on any system with a JVM installed.
JVM acts as an intermediary between the Java code and the underlying hardware/OS, making it platform dependent.
The JVM interpret...
Given a binary tree of integers, convert it to a sum tree where each node is replaced by the sum of the values of its left and right subtrees. Set leaf nodes to zero.
...Convert a binary tree to a sum tree by replacing each node with the sum of its left and right subtrees, setting leaf nodes to zero.
Traverse the tree in postorder fashion to calculate the sum of left and right subtrees for each node.
Set leaf nodes to zero by checking if a node has no children.
Update the value of each node to be the sum of its left and right subtrees.
Return the level order traversal of the converted...
Railway Reservation System for booking train tickets.
Users can search for trains based on source and destination stations.
Users can select preferred train, class, and seat.
System should handle payment processing and generate e-tickets.
Admin panel for managing trains, schedules, and bookings.
Integration with SMS/email notifications for updates.
Database to store train details, user information, and booking history.
Garbage collector in Java is a built-in mechanism that automatically manages memory by reclaiming unused objects.
Garbage collector runs in the background to identify and delete objects that are no longer needed.
It helps prevent memory leaks and optimize memory usage.
Examples of garbage collectors in Java include Serial, Parallel, CMS, and G1.
Yes, it is possible to import the same class or package twice in Java, but it will not cause any issues during runtime.
Importing the same class or package multiple times in Java will not result in any errors or conflicts.
The Java compiler will simply ignore duplicate imports and only include the class or package once in the compiled code.
This behavior helps in avoiding unnecessary redundancy and keeps the code cle...
Filters in MVC are components that allow pre-processing and post-processing of requests and responses.
Filters are used to perform common functionalities like logging, authentication, authorization, etc.
They can be applied globally to all controllers or selectively to specific controllers or actions.
Examples of filters include Authorization filters, Action filters, Result filters, and Exception filters.
I appeared for an interview before Apr 2024, where I was asked the following questions.
Efficiently locate an element in a sorted 2D matrix using binary search or a stair-step approach.
Use binary search on each row if the matrix is sorted row-wise.
For a matrix sorted both row-wise and column-wise, start from the top-right corner.
If the current element is greater than the target, move left; if less, move down.
Example: In a matrix [[1, 2, 3], [4, 5, 6], [7, 8, 9]], to find 5, start at 3 (top-right) and move...
I applied via Naukri.com and was interviewed before Sep 2020. There were 3 interview rounds.
I appeared for an interview before Feb 2021.
Round duration - 60 Minutes
Round difficulty - Medium
This round had 1 question related to DSA and then the majority of the questions were revolving around Java.
Given a binary tree of integers, convert it to a sum tree where each node is replaced by the sum of the values of its left and right subtrees. Set leaf nodes to zero.
...Convert a binary tree to a sum tree by replacing each node with the sum of its left and right subtrees, setting leaf nodes to zero.
Traverse the tree in postorder fashion to calculate the sum of left and right subtrees for each node.
Set leaf nodes to zero by checking if a node has no children.
Update the value of each node to be the sum of its left and right subtrees.
Return the level order traversal of the converted sum ...
Garbage collector in Java is a built-in mechanism that automatically manages memory by reclaiming unused objects.
Garbage collector runs in the background to identify and delete objects that are no longer needed.
It helps prevent memory leaks and optimize memory usage.
Examples of garbage collectors in Java include Serial, Parallel, CMS, and G1.
Java is platform independent because it compiles code into bytecode that can run on any system with a JVM, which is platform dependent due to its reliance on the underlying hardware and operating system.
Java code is compiled into bytecode, which can run on any system with a JVM installed.
JVM acts as an intermediary between the Java code and the underlying hardware/OS, making it platform dependent.
The JVM interprets the...
Marker interfaces in Java are interfaces with no methods, used to mark classes for special treatment.
Marker interfaces have no methods, they simply mark a class as having a certain capability or characteristic.
Examples of marker interfaces in Java include Serializable, Cloneable, and Remote.
Classes implementing marker interfaces can be treated differently by the JVM or other components based on the interface they imple...
Round duration - 60 Minutes
Round difficulty - Medium
In this round, I had 2 questions of DSA where I had to first explain my approach with proper compleixt analysis and then write the pseudo code for both of them. After that, I was asked some questions from Java and MVC architecture.
Design a data structure for a Least Recently Used (LRU) cache that supports the following operations:
1. get(key)
- Return the value of the key if it exists in the cache; otherw...
Design a Least Recently Used (LRU) cache data structure that supports get and put operations with capacity constraint.
Implement a doubly linked list to keep track of the order of keys based on their recent usage.
Use a hashmap to store key-value pairs for quick access and update.
When capacity is reached, evict the least recently used item before inserting a new item.
Handle get and put operations efficiently to maintain ...
You are provided with two singly linked lists containing integers, where both lists converge at some node belonging to a third linked list.
Your task is to determine t...
Find the node where two linked lists merge, return -1 if no merging occurs.
Traverse both lists to find their lengths and the difference in lengths
Move the pointer of the longer list by the difference in lengths
Traverse both lists simultaneously until they meet at the merging point
MVC components include Model, View, and Controller for organizing code in a web application.
Model: Represents the data and business logic of the application.
View: Represents the UI and presentation layer of the application.
Controller: Acts as an intermediary between Model and View, handling user input and updating the Model accordingly.
Example: In a web application, a user interacts with the View (UI), which sends requ...
Routing in MVC pattern is handled by a routing engine which maps incoming URLs to specific controller actions.
Routing is the process of matching incoming URLs to specific controller actions in the MVC pattern.
Routes are defined in a routing table which maps URLs to corresponding controller actions.
The routing engine uses the routing table to determine which controller and action should handle a particular request.
Route...
Yes, it is possible to import the same class or package twice in Java, but it will not cause any issues during runtime.
Importing the same class or package multiple times in Java will not result in any errors or conflicts.
The Java compiler will simply ignore duplicate imports and only include the class or package once in the compiled code.
This behavior helps in avoiding unnecessary redundancy and keeps the code clean an...
Round duration - 60 Minutes
Round difficulty - Medium
This round was inclined towards some Low Level Design Principles and some concepts from MVC.
Railway Reservation System for booking train tickets.
Users can search for trains based on source and destination stations.
Users can select preferred train, class, and seat.
System should handle payment processing and generate e-tickets.
Admin panel for managing trains, schedules, and bookings.
Integration with SMS/email notifications for updates.
Database to store train details, user information, and booking history.
Spring MVC is a framework used for building web applications in Java.
Spring MVC stands for Model-View-Controller, which is a design pattern for separating concerns in a web application.
It provides a powerful model for building flexible and loosely coupled web applications.
It integrates with other Spring frameworks like Spring Boot, Spring Security, and Spring Data.
It uses annotations to simplify configuration and reduc...
Filters in MVC are components that allow pre-processing and post-processing of requests and responses.
Filters are used to perform common functionalities like logging, authentication, authorization, etc.
They can be applied globally to all controllers or selectively to specific controllers or actions.
Examples of filters include Authorization filters, Action filters, Result filters, and Exception filters.
Tip 1 : Must do Previously asked Interview as well as Online Test Questions.
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.
Top trending discussions
I applied via Walk-in and was interviewed before Apr 2021. There were 3 interview rounds.
Process for freshers-
Go through RS Agarwal book and be ready for logical reasoning questions
Criteria for selection is 75% so make sure to select right ans
There will be 2 questions based on selected language
And questions on general English.
posted on 8 Jan 2021
I appeared for an interview before May 2021.
Round duration - 60 minutes
Round difficulty - Medium
Given a string STR and a non-empty string PTR, identify all the starting indices of anagrams of PTR within STR.
An anagram of a string is another string ...
Given a string STR and a non-empty string PTR, find all starting indices of anagrams of PTR within STR.
Create a frequency map of characters in PTR.
Use sliding window technique to check anagrams in STR.
Return the starting indices of anagrams found.
Given an array of integers, find the sum of all subsets in non-decreasing order of the given array.
N = 3, array = [1, 2]
[0, 1, 2, 3]
Find sum of all subsets in non-decreasing order of given array.
Use recursion to generate all subsets of the array
Calculate sum of each subset and store in a list
Sort the list in non-decreasing order to get the final result
Round duration - 60 minutes
Round difficulty - Medium
First he asked me to tell about myself, then he asked me some OOPS Concepts,difference in shallow copy and deep copy,
asked me to write a code for boundary traversal of binary tree.
Given a binary tree consisting of integers, your task is to provide the boundary nodes of this tree in an anti-clockwise direction, starting with the ro...
Boundary traversal of a binary tree to find left boundary, right boundary, and leaf nodes in an anti-clockwise direction.
Perform a pre-order traversal to get the left boundary nodes
Perform an in-order traversal to get the leaf nodes
Perform a post-order traversal to get the right boundary nodes
Combine the results to get the boundary nodes in anti-clockwise direction
Round duration - 60 minutes
Round difficulty - Easy
The second tech interview lasted for about an hour and half. First he asked me to tell about myself. Then he asked me how my first interview was. He then asked me where should I start, data structures, databases, to which I replied anywhere.
He started asking questions about C. He asked difference between call by pointer and call by reference. Whether a function can be defined as
void function(int &x, int &y);
Then he asked what is volatile data type in C. Then about the static data class.
He also asked me to write a program to find length of a string.
Then he asked about how functions in C work. How does the program know where to go back after a function is over, etc.
He then asked me if I knew C++, I said no. So he continued to ask a few questions on data structures.
He then asked about the ACID properties which a good database must have. He asked how are transactions managed by a database, what are commits, how, in case of a power failure, data is reverted back, etc.
Then he asked me whether I like to work individually or in a team. I said in a team. He then gave me scenario where I have to decide between a project I am working on, whose deadline is approaching, and helping a friend working on another project whose deadline is also approaching, and asked me what would I do in such a case.
This problem requires you to return a pointer that references the middle node of a singly linked list.
If the number of elements in the linked list is odd, ...
Return the middle node of a singly linked list, considering odd and even number of elements.
Traverse the linked list with two pointers, one moving twice as fast as the other
When the fast pointer reaches the end, the slow pointer will be at the middle
Return the node pointed to by the slow pointer as the middle node
Tip 1 : Practice at least 5 codes daily.
Tip 2 : Do at-least one machine Learning Project.
Tip 1 : Have at least three project.
Tip 2 : Put some achievements.
Calculate the number of children and grandchildren
Count the number of direct children of a person
Count the number of grandchildren of a person
Use recursion to count all descendants
Consider only living descendants
Exclude step-children and adopted children
I applied via Campus Placement and was interviewed before Nov 2021. There were 3 interview rounds.
Numerical and logical aptitude test
There are 5 rounds on datastructure and algorithm
I appeared for an interview in Jul 2021.
based on 3 interview experiences
Difficulty level
Duration
based on 44 reviews
Rating in categories
Senior Software Engineer
2.5k
salaries
| ₹20 L/yr - ₹37 L/yr |
Principal Consultant
2.3k
salaries
| ₹20.1 L/yr - ₹35 L/yr |
Senior Consultant
2.2k
salaries
| ₹14 L/yr - ₹24 L/yr |
Senior Member of Technical Staff
1.8k
salaries
| ₹23.8 L/yr - ₹41.6 L/yr |
Software Developer
1.6k
salaries
| ₹15.2 L/yr - ₹28 L/yr |
SAP
MongoDB
Salesforce
IBM