Filter interviews by
To find a number in a matrix where all rows and columns are sorted non-decreasingly. Complexity of the solution.
Use binary search to find the number in each row and column
Start from the top-right corner or bottom-left corner to optimize search
Time complexity: O(m log n) or O(n log m) depending on the starting corner
To find the starting point of a loop in a linked list, use Floyd's cycle-finding algorithm.
Use two pointers, one moving at twice the speed of the other.
When they meet, move one pointer to the head of the list and keep the other at the meeting point.
Move both pointers one step at a time until they meet again, which is the starting point of the loop.
To check if a directed graph is cyclic or not
Use Depth First Search (DFS) algorithm to traverse the graph
Maintain a visited set to keep track of visited nodes
Maintain a recursion stack to keep track of nodes in the current DFS traversal
If a node is visited and is already in the recursion stack, then the graph is cyclic
If DFS traversal completes without finding a cycle, then the graph is acyclic
Check if a binary tree is a binary search tree or not.
Traverse the tree in-order and check if the values are in ascending order.
For each node, check if its value is greater than the maximum value of its left subtree and less than the minimum value of its right subtree.
Use recursion to check if all nodes in the tree satisfy the above condition.
Design a stack that prints the minimum element pushed in O(1)
Use two stacks, one for storing elements and another for storing minimums
When pushing an element, compare it with the top of minimum stack and push the smaller one
When popping an element, pop from both stacks
To get the minimum element, just return the top of minimum stack
Return a random byte from a stream of bytes with equal probability.
Create a variable to store the count of bytes read
Create a variable to store the current random byte
For each byte read, generate a random number between 0 and the count of bytes read
If the random number is 0, store the current byte as the random byte
Return the random byte
Algorithm to find Nth-to-Last element in a singly linked list of unknown length
Traverse the list and maintain two pointers, one at the beginning and one at Nth node from beginning
Move both pointers simultaneously until the second pointer reaches the end of the list
The first pointer will be pointing to the Nth-to-Last element
If N=0, return the last element
Parse the list only once
Print all possible permutations of an array of integers
Use recursion to swap elements and generate permutations
Start with the first element and swap it with each subsequent element
Repeat the process for the remaining elements
Stop when all elements have been swapped with the first element
Print each permutation as it is generated
I appeared for an interview before Feb 2022.
To check if a directed graph is cyclic or not
Use Depth First Search (DFS) algorithm to traverse the graph
Maintain a visited set to keep track of visited nodes
Maintain a recursion stack to keep track of nodes in the current DFS traversal
If a node is visited and is already in the recursion stack, then the graph is cyclic
If DFS traversal completes without finding a cycle, then the graph is acyclic
Return a random byte from a stream of bytes with equal probability.
Create a variable to store the count of bytes read
Create a variable to store the current random byte
For each byte read, generate a random number between 0 and the count of bytes read
If the random number is 0, store the current byte as the random byte
Return the random byte
Check if a binary tree is a binary search tree or not.
Traverse the tree in-order and check if the values are in ascending order.
For each node, check if its value is greater than the maximum value of its left subtree and less than the minimum value of its right subtree.
Use recursion to check if all nodes in the tree satisfy the above condition.
Algorithm to find Nth-to-Last element in a singly linked list of unknown length
Traverse the list and maintain two pointers, one at the beginning and one at Nth node from beginning
Move both pointers simultaneously until the second pointer reaches the end of the list
The first pointer will be pointing to the Nth-to-Last element
If N=0, return the last element
Parse the list only once
Print all possible permutations of an array of integers
Use recursion to swap elements and generate permutations
Start with the first element and swap it with each subsequent element
Repeat the process for the remaining elements
Stop when all elements have been swapped with the first element
Print each permutation as it is generated
Design a stack that prints the minimum element pushed in O(1)
Use two stacks, one for storing elements and another for storing minimums
When pushing an element, compare it with the top of minimum stack and push the smaller one
When popping an element, pop from both stacks
To get the minimum element, just return the top of minimum stack
To find the starting point of a loop in a linked list, use Floyd's cycle-finding algorithm.
Use two pointers, one moving at twice the speed of the other.
When they meet, move one pointer to the head of the list and keep the other at the meeting point.
Move both pointers one step at a time until they meet again, which is the starting point of the loop.
To find a number in a matrix where all rows and columns are sorted non-decreasingly. Complexity of the solution.
Use binary search to find the number in each row and column
Start from the top-right corner or bottom-left corner to optimize search
Time complexity: O(m log n) or O(n log m) depending on the starting corner
Top trending discussions
I appeared for an interview before Apr 2021.
Round duration - 60 minutes
Round difficulty - Easy
The second round is also written but you need to write programming based on their concept.
Given a positive integer N
, your task is to identify all prime numbers less than or equal to N
.
A prime number is a natural number greater than 1 that has no po...
Identify all prime numbers less than or equal to a given positive integer N.
Iterate from 2 to N and check if each number is prime
Use the Sieve of Eratosthenes algorithm for better efficiency
Optimize by only checking up to the square root of N for divisors
Determine if a given string 'S' is a palindrome, considering only alphanumeric characters and ignoring spaces and symbols.
The string 'S' should be evaluated in a case...
Check if a given string is a palindrome after removing special characters, spaces, and converting to lowercase.
Remove special characters and spaces from the string
Convert the string to lowercase
Check if the modified string is a palindrome by comparing characters from start and end
Round duration - 60 minutes
Round difficulty - Easy
Technical round with questions mainly on Java and OOPS concepts.
Static methods belong to the class itself, while instance methods belong to individual objects of the class.
Static methods are called using the class name, while instance methods are called using object references.
Static methods cannot access instance variables directly, while instance methods can access both static and instance variables.
Static methods are shared among all instances of the class, while instance method...
Abstract class can have both abstract and non-abstract methods, while interface can only have abstract methods.
Abstract class can have constructors, member variables, and methods with implementation.
Interface can only have abstract methods and constants.
A class can implement multiple interfaces but can only extend one abstract class.
Example: Abstract class - Animal with abstract method 'eat', Interface - Flyable with m...
ClassNotFoundException occurs when a class is not found during runtime, while NoClassDefFoundError occurs when a class was found during compilation but not during runtime.
ClassNotFoundException is a checked exception, while NoClassDefFoundError is an Error.
ClassNotFoundException occurs when a class is not found at runtime, usually due to a missing classpath or incorrect class name.
NoClassDefFoundError occurs when a cla...
Error is a serious issue that cannot be handled at runtime, while Exception is a recoverable issue that can be caught and handled.
Error is a subclass of Throwable and is usually caused by the environment or system, such as running out of memory or stack overflow.
Exception is also a subclass of Throwable but is caused by the application code, such as invalid input or file not found.
Errors are unchecked and are not meant...
SerialVersionUID is a unique identifier used by Java to ensure the compatibility of serialized objects.
SerialVersionUID is a static final long variable in a class that implements Serializable interface.
It is used to ensure that the serialized object can be deserialized correctly even if the class definition has changed.
If the SerialVersionUID of the serialized object does not match the one in the class, an InvalidClass...
Requirements for creating an immutable class in Java
Make the class final so it cannot be extended
Make all fields private and final
Do not provide setter methods, only getter methods
Ensure that mutable objects are not returned in getter methods
Override equals() and hashCode() methods for proper comparison
Consider making defensive copies of mutable fields in constructor or getter methods
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.
I applied via Referral
Java internals, coding questions 2sum
Developed a web-based project management tool for tracking tasks and deadlines.
Used React.js for front-end development
Implemented RESTful APIs for backend using Node.js and Express
Utilized MongoDB for database storage
Incorporated authentication and authorization features for user security
Open to relocation for the right opportunity
Willing to relocate for the right job opportunity
Flexible with location for the right role
Open to considering different locations for the right position
Binary search is an efficient algorithm for finding an item from a sorted array by repeatedly dividing the search interval in half.
1. Binary search requires a sorted array to function correctly.
2. It works by comparing the target value to the middle element of the array.
3. If the target value is less than the middle element, search the left half; if greater, search the right half.
4. Repeat the process until the target ...
I am looking for a competitive salary that reflects my skills and experience in software development.
Based on my research, the average salary for a software developer in this region is between $80,000 and $100,000.
I have over 5 years of experience in full-stack development, which I believe justifies a salary towards the higher end of that range.
I am open to discussing the entire compensation package, including benefits...
posted on 13 Feb 2024
I applied via Naukri.com and was interviewed in Mar 2023. There were 2 interview rounds.
Reactive forms in Angular are a way to build forms in a reactive and scalable way.
Reactive forms use an underlying data model to manage form data.
They allow for dynamic form creation and validation.
They can be used with complex form structures and nested forms.
They provide a more scalable and maintainable approach to form development.
Example: Creating a reactive form with FormBuilder in Angular.
Coding test was medium to hard leetcode problems.
I applied via Campus Placement and was interviewed before Oct 2022. There were 3 interview rounds.
There will be 3 coding questions, Easy, moderate and hard level.
I applied via Campus Placement and was interviewed in Jul 2024. There was 1 interview round.
3 hours was the duration of the test. 3 questions were asked
Some of the top questions asked at the Mentor Graphics Software Developer interview -
based on 1 interview experience
Difficulty level
Duration
based on 2 reviews
Rating in categories
Senior Member of Technical Staff
69
salaries
| ₹12 L/yr - ₹30 L/yr |
Lead Member Technical Staff
41
salaries
| ₹19 L/yr - ₹32 L/yr |
Member Consulting Staff
31
salaries
| ₹25.5 L/yr - ₹56 L/yr |
Member Technical Staff
29
salaries
| ₹13.5 L/yr - ₹22.2 L/yr |
Software Engineer
15
salaries
| ₹11 L/yr - ₹23 L/yr |
Duck Creek Technologies
FinThrive
Mobileum
OnProcess Technology