Filter interviews by
Clear (1)
Design data structure for Excel sheet
Use a 2D array to represent rows and columns
Each cell can contain a string or a formula
Include metadata such as cell formatting and data validation rules
Monitors are implemented in OS to synchronize access to shared resources.
Monitors are used to ensure mutual exclusion and synchronization of shared resources.
They are implemented using locks and condition variables.
Monitors provide a higher level of abstraction than locks and semaphores.
Examples of monitors in OS include Java's synchronized keyword and C#'s lock statement.
To delete nth node in a linked list, we need to traverse to the (n-1)th node and change its next pointer to (n+1)th node.
Traverse to (n-1)th node and change its next pointer to (n+1)th node
Handle edge cases like deleting the first node or deleting the last node
Free the memory of the deleted node
Creating a pointer for an abstract class and pointing it to a derived class object with a function name conflict.
Use virtual keyword for the function in the abstract class.
Use override keyword for the function in the derived class.
Access the function using the pointer with the derived class object.
Top trending discussions
I was interviewed before Jan 2021.
Round duration - 60 Minutes
Round difficulty - Medium
The interviewer asked me 2 questions related to DS/Algo in this round . Both the questions were of Easy-Medium difficulty and I was also required to code them in a production ready manner.
You are provided with a binary tree consisting of N
nodes where each node has an integer value. The task is to determine the maximum sum achievable by a...
Find the maximum sum achievable by a simple path between any two nodes in a binary tree.
Traverse the binary tree to find all possible paths and calculate their sums.
Keep track of the maximum sum encountered during traversal.
Consider paths that may include the same node twice.
Implement a recursive function to explore all possible paths.
Handle cases where nodes have negative values.
Given two arrays A
and B
with sizes N
and M
respectively, both sorted in non-decreasing order, determine their intersection.
The intersection of two arrays in...
The problem involves finding the intersection of two sorted arrays efficiently.
Use two pointers to iterate through both arrays simultaneously.
Compare elements at the pointers and move the pointers accordingly.
Handle cases where elements are equal, and update the intersection array.
Return the intersection array as the result.
Round duration - 50 Minutes
Round difficulty - Medium
This round had 2 questions of DS/Algo to solve under 50 minutes and one question related to Operating Systems.
You are provided with an array or list ARR
containing N
positive integers. Your task is to determine the Next Greater Element (NGE) for each element in the array.
T...
Find the Next Greater Element for each element in an array.
Iterate through the array from right to left
Use a stack to keep track of elements with no greater element to the right
Pop elements from the stack until finding a greater element or stack is empty
Given three integers X
, C
, and Y
, where X
is the first term of an arithmetic sequence with a common difference of C
, determine if Y
is part of this arithmetic sequ...
Check if a given number is part of an arithmetic sequence with a given first term and common difference.
Calculate the arithmetic sequence using the formula: nth term = X + (n-1) * C
Check if Y is equal to any term in the sequence to determine if it belongs to the sequence
Return 'True' if Y belongs to the sequence, otherwise return 'False'
Processes are instances of programs in execution, while threads are smaller units within a process that can execute independently.
A process is a program in execution, consisting of code, data, and resources.
Threads are smaller units within a process that can execute independently.
Processes have their own memory space, while threads share the same memory space within a process.
Processes are heavyweight, while threads ar...
Round duration - 50 Minutes
Round difficulty - Medium
This round had 2 questions of DSA of Easy-Medium difficulty and at the end I was asked a Puzzle to check my general problem solving ability.
Given an array/list arr
of size n
, determine the maximum product possible by taking any subset of the array/list arr
. Return the result modulo 10^9+7
since the product ...
Find the maximum product of a subset of an array modulo 10^9+7.
Iterate through the array and keep track of the maximum positive product and minimum negative product encountered so far.
Handle cases where the array contains zeros separately.
Return the maximum product modulo 10^9+7.
Given a complete binary tree with 'N' nodes, your task is to determine the 'next' node immediately to the right in level order for each node in the given tree.
...Implement a function to update 'next' pointers in a complete binary tree.
Iterate level by level using a queue
Connect nodes at each level using 'next' pointers
Handle null nodes appropriately
Ensure the tree is a complete binary tree
Round duration - 50 Minutes
Round difficulty - Medium
This round consisted of 2 questions from DSA where I was first asked to explain my approach to the interviewer with proper complexity analysis and then code the problems. The interviewer was quite friendly and also provided me some hints when I was stuck.
Create a stack data structure that supports not only the usual push and pop operations but also getMin(), which retrieves the minimum element, all in O(1) time complexity witho...
Implement a stack with push, pop, top, isEmpty, and getMin operations in O(1) time complexity without using extra space.
Use two stacks - one to store the actual elements and another to store the minimum element at each level.
When pushing an element, check if it is smaller than the current minimum and update the minimum stack accordingly.
When popping an element, also pop from the minimum stack if the popped element is t...
You are given an integer array arr
of size N
. Your task is to split the array into the maximum number of subarrays such that the first and last occurre...
Given an array, split it into maximum subarrays with first and last occurrence of each element in a single subarray.
Iterate through the array and keep track of the first and last occurrence of each element.
Use a hashmap to store the indices of each element.
Split the array whenever the last occurrence of an element is found.
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.
To determine if a point is inside a polygon, use the ray casting algorithm.
Create a line from the point to a point outside the polygon
Count the number of times the line intersects with the polygon edges
If the count is odd, the point is inside the polygon; otherwise, it is outside
The four storage classes in C are auto, register, static, and extern.
Auto: default storage class for all local variables
Register: used to define local variables that should be stored in a register instead of RAM
Static: used to define local variables that retain their value between function calls
Extern: used to declare a global variable that is defined in another file
i is stored in global data segment, j is stored in stack, k is stored in heap.
i is a global variable and is stored in the global data segment
j is a local variable and is stored in the stack
k is a pointer variable and is stored in the stack, while the memory it points to is allocated on the heap using malloc()
Use a hash table to store the words and check for existence in constant time.
Create a hash table with the words as keys and a boolean value as the value.
For each new word, check if it exists in the hash table. If it does, it has appeared before. If not, add it to the hash table.
Alternatively, use a set data structure to store only the unique words and check for existence in the set.
Operating on images in parallel involves dividing the image into smaller parts and processing them simultaneously.
Divide the image into smaller parts using techniques like tiling or splitting
Use parallel processing techniques like multi-threading or GPU acceleration
Combine the processed parts to form the final image
Examples: image segmentation, object detection, image enhancement
Hardware engines support parallelism through multiple cores and threads.
Hardware engines can have multiple cores and threads to execute tasks simultaneously.
Parallelism can improve performance and efficiency in hardware-based tasks.
Examples include GPUs, FPGAs, and ASICs that have parallel processing capabilities.
Hardware parallelism can also be achieved through distributed computing and clustering.
Programming language...
Modern OSes support parallelism through multi-core processors and threading.
Modern OSes like Windows, macOS, and Linux support parallelism through multi-core processors and threading.
Parallelism can be achieved through processes or threads.
Parallelism can improve performance and efficiency of software.
Examples of parallel programming frameworks include OpenMP and MPI.
Memory protection is a feature of an operating system that prevents unauthorized access to memory locations.
Memory protection is achieved through the use of memory management units (MMUs) and virtual memory.
MMUs map virtual addresses to physical addresses and enforce access permissions.
Virtual memory allows the OS to allocate memory to processes in a way that isolates them from each other.
Examples of memory protection ...
To speed up multiplication of small integers in an array, we can use bitwise operations and parallel processing.
Use bitwise operations like shifting and ANDing to perform multiplication faster.
Divide the array into smaller chunks and perform multiplication in parallel using multi-threading or SIMD instructions.
Use lookup tables for frequently used values to avoid repeated calculations.
Use compiler optimizations like lo...
Design a data structure for excel spreadsheet
Use a 2D array to store cell values
Implement formulas using a stack
Include formatting options for cells
Insertion sort and quicksort are sorting algorithms used to sort arrays of data.
Insertion sort: iterates through the array and inserts each element into its proper position.
Quicksort: selects a pivot element and partitions the array into two sub-arrays, one with elements less than the pivot and one with elements greater than the pivot.
Insertion sort is best for small arrays, while quicksort is best for large arrays.
Bot...
Merge two sorted linked lists using recursion
Create a recursive function that compares the first nodes of both lists
Set the smaller node as the head of the merged list and call the function again with the next node of the smaller list
Base case: if one list is empty, return the other list
Return the merged list
Given an integer, determine which byte is zero.
Convert the integer to a byte array using bitwise operations.
Iterate through the byte array and check for a zero value.
Return the index of the zero byte.
Consider endianness when converting to byte array.
To check endianness, create a 4-byte integer with a known value and check the byte order.
Create a 4-byte integer with a known value
Check the value of the first byte to determine endianness
If the first byte is the least significant, the machine is little endian
If the first byte is the most significant, the machine is big endian
Static objects can be used to print something before main() execution.
Static objects are initialized before main() execution
They can be used to print something before main()
Example: static int x = printf("Hello World!");
Output: Hello World! will be printed before main() execution
Static variables are allocated memory in the data segment of the program's memory space.
Static variables have a fixed memory location throughout the program's execution.
They are initialized to zero by default.
If initialized explicitly, they are stored in the data segment.
Static variables can be accessed by any function in the program.
Finding space and time complexity of a recursive function.
Space complexity is the amount of memory used by the function.
Time complexity is the amount of time taken by the function to execute.
Recursive functions have higher space complexity due to the call stack.
Time complexity can be calculated using Big O notation.
Examples of recursive functions include factorial and Fibonacci sequence.
Diamond hierarchy problem is a problem in object-oriented programming where a class inherits from multiple classes in a diamond-shaped hierarchy.
Occurs when a class inherits from two classes that share a common base class
Can lead to ambiguity in method calls and data members
Solved using virtual inheritance or by using interfaces
Return all root to leaf node paths in a binary tree with row, col and value.
Traverse the binary tree recursively and keep track of the current path.
When a leaf node is reached, add the path to the result array.
Include row, col and value of each node in the path.
Use an array of strings to store the paths.
To get max value from a stack in O(1), maintain a separate stack to keep track of maximum values.
Create a separate stack to keep track of maximum values
Push the maximum value onto the stack whenever a new maximum is encountered
Pop the maximum value stack whenever the top element of the main stack is popped
Return the top element of the maximum value stack to get the maximum value in O(1)
To get max element from a queue in O(1) time complexity
Maintain a separate variable to keep track of the maximum element in the queue
Update the maximum element variable whenever a new element is added or removed from the queue
Return the maximum element variable when getMax() function is called
Find the Next Greatest Element to the right for each element in an array of strings.
Iterate through the array from right to left
Use a stack to keep track of elements
Pop elements from stack until a greater element is found
If no greater element is found, assign -1
Return the result array
To remove unnecessary parenthesis from an expression, we need to apply a set of rules to identify and eliminate them.
Identify and remove parenthesis around single variables or constants
Identify and remove parenthesis around expressions with only one operator
Identify and remove parenthesis around expressions with operators of equal precedence
Identify and remove parenthesis around expressions with operators of different ...
Find the maximum product of three integers in an array.
Sort the array in descending order.
Check the product of the first three numbers and the product of the first and last two numbers.
Return the maximum of the two products.
Find length of longest consecutive sub array forming an AP from given array of integers.
Sort the array in ascending order
Iterate through the array and find the longest consecutive sub array forming an AP
Use a variable to keep track of the length of the current consecutive sub array forming an AP
Use another variable to keep track of the length of the longest consecutive sub array forming an AP seen so far
I was interviewed before Mar 2021.
Round duration - 60 minutes
Round difficulty - Medium
The interviewer was really cool. He realized that I mostly work on java applications so he chose to ask me stuff related to that. He didn't want me to know the answer well but just wanted me to approach to it, maybe think more. He went through my resume back and forth and asked mostly about all my projects and their logic and how could I take them to the next level.
Tips: Be confident. Its okay not to know any answer, just try giving it a shot in the approach.
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
final is a keyword used to declare constants, finally is a block used in exception handling, and finalize is a method used for cleanup.
final is a keyword used to declare constants in Java, meaning the value cannot be changed once assigned. Example: final int x = 10;
finally is a block used in exception handling to ensure a piece of code is always executed, whether an exception is thrown or not. Example: try { // code } ...
Private restricts access to the class itself, while final prevents inheritance and method overriding.
Private access modifier restricts access to the class itself, while final access modifier prevents inheritance and method overriding.
Private members are only accessible within the same class, while final classes cannot be extended and final methods cannot be overridden.
Example: private int num; - num can only be accesse...
Establishing a JDBC connection involves loading the driver, creating a connection, creating a statement, executing queries, and handling exceptions.
Load the JDBC driver using Class.forName() method
Create a connection using DriverManager.getConnection() method
Create a statement using connection.createStatement() method
Execute queries using statement.executeQuery() method
Handle exceptions using try-catch blocks
JSON is a lightweight data interchange format used to store and transmit data between a server and a web application.
JSON stands for JavaScript Object Notation.
It is easy for humans to read and write, and easy for machines to parse and generate.
JSON is language-independent and can be used with any programming language.
Example: {"name": "John", "age": 30}
Example: [{"name": "Alice", "age": 25}, {"name": "Bob", "age": 35}
Garbage collection in Java is the process of automatically managing memory by deallocating objects that are no longer needed.
Garbage collection helps in preventing memory leaks by reclaiming memory used by objects that are no longer referenced.
Java uses a garbage collector to automatically manage memory, unlike languages like C++ where memory management is manual.
Garbage collection in Java can be triggered by calling S...
Round duration - 30 minutes
Round difficulty - Easy
I wouldn't say it went great but it was fine. I did not think I would clear it as for most of the questions the interviewer seemed disappointed and wanted more out of me.
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.
posted on 19 Aug 2016
I am a software developer with experience in Java and Python.
Proficient in Java and Python programming languages
Experience in developing web applications using Spring framework
Familiarity with database management systems such as MySQL and MongoDB
I have achieved success in developing and implementing various software solutions.
Developed a web application that increased user engagement by 30%
Implemented a new feature that reduced system downtime by 50%
Created a mobile app that received 4.5-star rating on app stores
Led a team of developers to successfully complete a project within a tight deadline
I work on a variety of projects ranging from web development to mobile app development.
Web development using HTML, CSS, JavaScript, and various frameworks such as React and Angular
Mobile app development for iOS and Android using Swift, Kotlin, and React Native
Database design and management using SQL and NoSQL databases such as MySQL and MongoDB
API development and integration using REST and GraphQL
Machine learning proje...
A hardworker puts in more effort, while a smartworker works efficiently and effectively.
A hardworker may spend more time on a task, while a smartworker finds ways to complete it faster.
A hardworker may rely on brute force, while a smartworker uses their skills and knowledge to solve problems.
A hardworker may struggle with prioritization, while a smartworker knows how to focus on the most important tasks.
A hardworker ma...
Zuckerberg is in news due to Facebook's handling of user data and misinformation.
Facebook's role in the 2016 US Presidential election
Cambridge Analytica scandal
Testimony before US Congress
Ongoing debate on social media regulation
I am a software developer with experience in Java and Python.
I have a Bachelor's degree in Computer Science.
I have worked on various projects involving web development and data analysis.
I am proficient in Java and Python programming languages.
I am a quick learner and enjoy working in a team environment.
My favorite project is the e-commerce website I developed for a local business.
I enjoyed working on the front-end design and user experience.
I implemented a secure payment gateway and order tracking system.
The website increased the business's online sales by 50%.
I received positive feedback from the client and their customers.
Inheritance is a mechanism in object-oriented programming where a new class is created by inheriting properties of an existing class.
Inheritance allows code reuse and promotes code organization.
The existing class is called the parent or superclass, and the new class is called the child or subclass.
The child class inherits all the properties and methods of the parent class and can also add its own unique properties and ...
finally is a keyword used in try-catch block, finalize is a method in Object class, and final is a keyword used for declaring constants.
finally is used to execute a block of code after try-catch block
finalize is called by garbage collector before destroying an object
final is used to declare a constant variable or to make a class uninheritable
Private keyword restricts access to member functions within the class while final keyword prevents overriding of functions.
Private keyword is used to hide the implementation details of a class from the user.
Final keyword is used to prevent the user from overriding a function in a subclass.
Using private and final keywords together can ensure that the implementation details of a class are not modified by the user.
An interface defines a set of methods that a class must implement.
An interface is declared using the 'interface' keyword.
All methods in an interface are public and abstract by default.
A class can implement multiple interfaces.
Interfaces can also extend other interfaces.
Example: public interface MyInterface { void myMethod(); }
Abstract class is a class with some implementation while Interface is a contract with no implementation.
Abstract class can have constructors while Interface cannot
Abstract class can have non-abstract methods while Interface cannot
A class can implement multiple interfaces but can only inherit from one abstract class
Abstract class is used when there is a need for common functionality among related classes while Interface...
Inheritance types in Java
Java supports single and multiple inheritance through classes and interfaces respectively
Single inheritance is when a class extends only one parent class
Multiple inheritance is when a class implements multiple interfaces
Java also supports hierarchical inheritance where multiple classes extend a single parent class
Java does not support multiple inheritance through classes to avoid the diamond pr
Order of catch blocks in a try block in Java
Specific catch blocks should come before general catch blocks
If general catch block comes before specific catch block, it will result in a compile-time error
If multiple catch blocks are present, only the first matching catch block will be executed
Garbage collection is an automatic memory management process that frees up memory occupied by objects that are no longer in use.
Garbage collection is used in programming languages like Java, C#, and Python.
It helps prevent memory leaks and reduces the risk of crashes due to memory exhaustion.
Garbage collection works by identifying objects that are no longer in use and freeing up the memory they occupy.
There are differe...
Code for connecting a Java application to a database
Import the JDBC driver for the specific database
Create a connection object using the DriverManager class
Create a statement object to execute SQL queries
Execute the query and retrieve the results
Close the connection and release resources
JSON stands for JavaScript Object Notation, a lightweight data interchange format.
JSON is used to transmit data between a server and a web application, as an alternative to XML.
It is easy to read and write for humans and easy to parse and generate for machines.
JSON is a text format that is completely language independent but uses conventions that are familiar to programmers of the C family of languages.
Example: {"name"
Bubble sort is a simple sorting algorithm that repeatedly steps through the list, compares adjacent elements and swaps them if they are in the wrong order.
Bubble sort has a worst-case and average complexity of O(n^2), where n is the number of items being sorted.
It is not efficient for large lists and is generally used for educational purposes.
Example: Sorting an array of strings in alphabetical order using bubble sort.
Auto and static are two storage classes in C. Auto variables are local to a function while static variables retain their value between function calls.
Auto variables are created when a function is called and destroyed when the function ends
Static variables are initialized only once and retain their value between function calls
Auto variables have garbage value if not initialized while static variables are initialized to
My strengths include problem-solving, attention to detail, and adaptability. My weaknesses include public speaking and impatience.
Strengths: problem-solving, attention to detail, adaptability
Weaknesses: public speaking, impatience
In 5 years, I see myself as a senior software developer leading a team of developers to create innovative solutions.
Leading a team of developers to create innovative solutions
Continuing to learn and stay up-to-date with the latest technologies
Contributing to the growth and success of the company
Mentoring and coaching junior developers
Taking on more responsibilities and challenges
I am interested in exploring new technologies and learning new programming languages.
Exploring new technologies
Learning new programming languages
Attending tech conferences and meetups
Contributing to open source projects
Yes, I am open to relocation for the right opportunity.
I am willing to relocate for the right job opportunity
I am open to exploring new cities and cultures
I am willing to consider relocation assistance
I am excited about the prospect of working in a new environment
Garbage collection is necessary to free up memory occupied by unused objects. Java uses automatic garbage collection.
Garbage collection helps prevent memory leaks and improves performance.
Java uses a mark-and-sweep algorithm to identify and remove unused objects.
The JVM periodically checks for unused objects and frees up memory occupied by them.
Developers can also manually trigger garbage collection using System.gc() m...
TCP is a connection-oriented protocol while UDP is connectionless.
TCP provides reliable data transfer while UDP does not guarantee reliability.
TCP uses flow control and congestion control while UDP does not.
TCP is slower than UDP due to the overhead of establishing and maintaining a connection.
UDP is faster than TCP for applications that can tolerate data loss such as video streaming or online gaming.
UDP is used in scenarios where speed is more important than reliability, such as online gaming and video streaming.
UDP is a connectionless protocol that does not guarantee delivery of packets
It is faster than TCP because it does not have to establish a connection before sending data
UDP is commonly used in online gaming, video streaming, and VoIP applications
It is also used for broadcasting and multicasting data to mult
The probability that three ants running on the edges of an equilateral triangle will never meet is 1/3.
The ants will never meet if they all move in the same direction (clockwise or counterclockwise) at the same speed.
The probability of this happening is 1/3, as each ant has two possible directions to choose from.
Example: If one ant starts moving clockwise, the other two ants must also move clockwise to never meet.
I am a software developer with experience in Java and Python.
I have a Bachelor's degree in Computer Science.
I have worked on various projects involving web development and data analysis.
I am proficient in Java and Python programming languages.
I am a quick learner and enjoy working in a team environment.
In 5 years, I see myself as a senior software developer leading a team of developers to create innovative solutions.
Leading a team of developers
Creating innovative solutions
Continuing to learn and grow as a developer
Contributing to the success of the company
Building strong relationships with colleagues and clients
Software Engineer
117
salaries
| ₹0 L/yr - ₹0 L/yr |
Senior Software Engineer
109
salaries
| ₹0 L/yr - ₹0 L/yr |
Software Engineer2
94
salaries
| ₹0 L/yr - ₹0 L/yr |
Platform Operations Engineer
68
salaries
| ₹0 L/yr - ₹0 L/yr |
Technical Solutions Engineer
63
salaries
| ₹0 L/yr - ₹0 L/yr |
Limelight Networks
Cloudflare
F5 Networks
Level 3 Communications