Filter interviews by
Clear (1)
Array is a collection of elements stored in contiguous memory locations while linked list is a collection of nodes linked by pointers.
Arrays have fixed size while linked lists can grow or shrink dynamically
Insertion and deletion is faster in linked lists than arrays
Accessing elements in arrays is faster than linked lists
Arrays are better for random access while linked lists are better for sequential access
An array of key-value pairs is the best data structure for a dictionary.
Use a hash table or a balanced tree to implement the dictionary.
Keys should be unique and immutable.
Values can be any data type.
Access time should be O(1) or O(log n) depending on the implementation.
Examples: Python's dict, Java's HashMap, C++'s unordered_map.
Hashing is a technique to map data to a fixed-size table. Time complexity of searching a hash table is O(n) in worst case.
Hashing is used to store and retrieve data quickly
It uses a hash function to map data to a fixed-size table
In the best case, searching a hash table takes O(1) time
In the worst case, all the data maps to the same index and searching takes O(n) time
Collision resolution techniques like chaining and ope
A linked list is used to store and manipulate a collection of data elements in a linear order.
Linked lists are commonly used in computer science for implementing data structures like stacks, queues, and hash tables.
They are also used in operating systems for managing memory allocation.
For example, a linked list can be used to implement a music playlist where each song is a node and the links between nodes represent the...
Implement a stack using a linked list
Create a Node class with data and next pointer
Create a Stack class with top pointer
Push new nodes to the top of the stack
Pop nodes from the top of the stack
Check if the stack is empty before popping
BST stands for Binary Search Tree, a data structure used for efficient searching and sorting operations.
BST is a tree-like data structure where each node has at most two children.
The left child of a node contains a value less than the parent node, while the right child contains a value greater than the parent node.
BST allows for efficient searching and sorting operations with a time complexity of O(log n).
Examples of a...
Program to check if a binary tree is a BST
Traverse the tree in-order and check if the values are in ascending order
Use a min-max range for each node to check if it satisfies the BST property
Recursively check if the left and right subtrees are BSTs
Endianess refers to the order in which bytes are stored in memory. Little endian stores the least significant byte first.
Check the byte order of a multi-byte integer value
Use a test value with known byte order to determine the system's endianess
Check the system's documentation or specifications
Use a code snippet to determine the endianess
Function pointers can be shared across processes using inter-process communication mechanisms like shared memory, pipes, sockets, etc.
Function pointers can be stored in shared memory regions that are accessible by multiple processes.
Processes can communicate with each other using pipes or sockets and pass function pointers as arguments.
Remote Procedure Call (RPC) mechanisms can also be used to share function pointers a...
Binder is a mechanism for inter-process communication in Android.
Binder allows different processes to communicate with each other.
It is used for implementing Android's IPC (Inter-Process Communication) system.
Binder uses a client-server model where the client sends requests to the server and the server responds with the requested data.
It is used for sharing data between different components of an Android application.
Bi...
sysctrl is a system control utility used to manage system settings and configurations.
sysctrl is used to manage system settings and configurations such as network settings, power management, and hardware configurations.
It can be used to start, stop, and restart system services.
sysctrl is commonly used in Linux and Unix-based operating systems.
Examples of sysctrl commands include 'sysctrl -p' to reload all settings from...
Device tree is a data structure used to describe hardware components in a system and their interconnections.
Device tree is used in embedded systems to provide a standardized way of describing hardware components.
It is written in a language called Device Tree Source (DTS) and compiled into a binary format called Device Tree Blob (DTB).
The device tree is loaded by the bootloader and used by the kernel to configure the ha...
4 IPCs used in user level process in Linux
Message Queues - allows processes to exchange data through messages
Shared Memory - allows processes to share a portion of memory
Semaphores - used for synchronization between processes
Pipes - allows communication between two related processes
Inter-process communication mechanisms like pipes, sockets, message queues, shared memory can be used to call a function from one user process to another.
Use pipes to establish a unidirectional communication channel between two processes.
Use sockets to establish a bidirectional communication channel between two processes.
Use message queues to send messages between processes.
Use shared memory to share data between proce...
Program with 2 threads printing even and odd numbers in sequence. How to make it SMP safe?
Use mutex locks to ensure only one thread accesses the shared resource (the number to be printed) at a time
Use condition variables to signal when it's safe for the other thread to access the shared resource
Use atomic variables to ensure that the shared resource is accessed atomically
Use thread-safe data structures to store the sha...
Medium difficulty level of questions
I was interviewed in Sep 2017.
Use bitwise operations to find the sum of two numbers without using mathematical operators.
Use bitwise XOR to find the sum of two numbers without carrying.
Use bitwise AND and left shift to find the carry.
Repeat the process until there is no carry left.
To delete a node from a linked list when only given a reference to the node, we can copy the data of the next node to the given node and delete the next node.
Copy the data of the next node to the given node
Update the next pointer of the given node to skip the next node
Delete the next node
I was interviewed in Nov 2016.
Need more context. What needs to be done with the large rectangle?
What are the dimensions of the rectangle?
Is it a 2D or 3D object?
What is the context of the problem?
Are there any constraints or limitations?
What tools or programming languages can be used?
Derive a formula to determine how many smaller rectangles fit into a bigger rectangle given their dimensions.
Calculate the number of times the smaller rectangle can fit into the bigger rectangle horizontally and vertically
Divide the width of the bigger rectangle by the width of the smaller rectangle to get the horizontal count
Divide the height of the bigger rectangle by the height of the smaller rectangle to get the ve...
At least 4 points are required to draw a rectangle.
A rectangle has 4 sides and 4 corners, so at least 4 points are needed to define those corners.
The points must be arranged in a specific order to form a closed shape with 4 sides.
Additional points can be used to add details or modify the shape of the rectangle.
The number of points required may vary depending on the software or tool used to draw the rectangle.
Answering how to calculate new coordinates of a scaled rectangle and providing a program for it.
To calculate new coordinates, multiply the original coordinates by the scaling factor
Scaling factor can be calculated by dividing the new length/breadth by the original length/breadth
Program can take input of original coordinates, scaling factor, and output new coordinates
Example: Original coordinates: (0,0), (0,5), (5,5), (...
I applied via Campus Placement
The question asks to fill the blanks in a pyramid where each number is the sum of the numbers in the bottom two cells.
Start from the bottom row and work your way up, calculating the sum of the numbers in the bottom two cells for each blank space.
Use a loop to iterate through each row and column of the pyramid.
Store the calculated sum in the corresponding blank space.
Repeat the process until all the blanks are filled.
Moore's Law is the observation that the number of transistors in a dense integrated circuit doubles about every two years.
Named after Intel co-founder Gordon Moore
First stated in 1965
Has been a driving force behind technological advancements
Predicts exponential growth in computing power
Has been challenged in recent years due to physical limitations
A process is an instance of a program while a thread is a subset of a process.
A process has its own memory space while threads share memory space
Processes are heavyweight while threads are lightweight
Processes communicate through inter-process communication while threads communicate through shared memory
Examples of processes include web browsers, text editors, etc. while examples of threads include GUI updates, backgro
Multi-core processors provide faster and more efficient computing.
Improved performance and speed
Ability to handle multiple tasks simultaneously
Reduced power consumption
Better multitasking capabilities
Enhanced user experience
Examples: Intel Core i7, AMD Ryzen 9
I am a software engineer with a loving family.
I have been working as a software engineer for 5 years.
My wife is a teacher and we have two children.
We enjoy spending time together outdoors and traveling.
My parents live in a different state but we keep in touch regularly.
Family is very important to me and I prioritize spending time with them.
Developed a web-based project management tool and a mobile app for tracking expenses
Created a responsive UI using React and Bootstrap
Implemented user authentication and authorization using Firebase
Integrated Google Maps API for location tracking in the mobile app
Used Node.js and MongoDB for backend development
Collaborated with a team of four to complete the projects
I have 5 years of experience in software engineering with expertise in Java and Python.
Developed and maintained web applications using Java and Spring framework
Designed and implemented RESTful APIs using Python and Flask
Worked on database management and optimization using MySQL and MongoDB
Collaborated with cross-functional teams to deliver high-quality software products
Participated in code reviews and provided construc
My academic interests include computer science, artificial intelligence, and machine learning.
Computer science
Artificial intelligence
Machine learning
Explain Big O notation
Big O notation is used to describe the time complexity of an algorithm
It helps us understand how the algorithm's performance changes with input size
O(1) means constant time, O(n) means linear time, O(n^2) means quadratic time
We want algorithms with lower Big O values for better performance
I am open to relocation based on the job opportunity and growth prospects.
Open to relocation for the right opportunity
Willing to move for career growth
Flexible with location based on job requirements
Yes, I would love to have a pizza slice!
I am a big fan of pizza and would never say no to a slice!
Pizza is the perfect food for any occasion, whether it's a quick lunch or a late-night snack.
I particularly enjoy pepperoni and mushroom pizza, but I'm open to trying new toppings as well.
I applied via Campus Placement and was interviewed in Dec 2016. There were 5 interview rounds.
UDP is preferred over TCP in this project due to its low latency and lightweight nature.
UDP is a connectionless protocol, which means it does not establish a direct connection between the sender and receiver.
UDP is faster than TCP as it does not have the overhead of establishing and maintaining a connection.
UDP is suitable for applications where real-time data transmission is crucial, such as video streaming or online ...
To clear the 7th bit in a 32-bit register, perform a bitwise AND operation with a mask that has all bits set to 1 except the 7th bit.
Create a mask with the 7th bit set to 0 and all other bits set to 1
Perform a bitwise AND operation between the register and the mask
Store the result back in the register
posted on 10 May 2015
Locate sum of 2 numbers in a linear array (unsorted and sorted) and their complexities
For unsorted array, use nested loops to compare each element with every other element until the sum is found
For sorted array, use two pointers approach starting from the beginning and end of the array and move them towards each other until the sum is found
Complexity for unsorted array is O(n^2) and for sorted array is O(n)
Pointers are used to manipulate memory addresses and values in C++. Increment/decrement, address of and value at operators are commonly used.
Incrementing a pointer moves it to the next memory location of the same data type
Decrementing a pointer moves it to the previous memory location of the same data type
The address of operator (&) returns the memory address of a variable
The value at operator (*) returns the value sto
To determine if a point is inside or outside a rectangle, we check if the point's coordinates fall within the rectangle's boundaries.
Check if the point's x-coordinate is greater than the left edge of the rectangle
Check if the point's x-coordinate is less than the right edge of the rectangle
Check if the point's y-coordinate is greater than the top edge of the rectangle
Check if the point's y-coordinate is less than the b...
To find line that divides rectangle into 2 equal halves through a point inside it.
Find the center of the rectangle
Draw a line from the center to the given point
Extend the line to the opposite side of the rectangle
The extended line will divide the rectangle into 2 equal halves
There are multiple combinations of 8-bit and 16-bit signed numbers. How many such combinations are possible?
There are 2^8 (256) possible combinations of 8-bit signed numbers.
There are 2^16 (65,536) possible combinations of 16-bit signed numbers.
To find the total number of combinations, we can add the number of combinations of 8-bit and 16-bit signed numbers.
Therefore, the total number of possible combinations is 256 +
Find duplicates in an array of elements in 0(n) time and 0(1) space.
Use the property of inputs to your advantage
Iterate through the array and mark elements as negative
If an element is already negative, it is a duplicate
Return all the negative elements as duplicates
Technical Lead
248
salaries
| ₹0 L/yr - ₹0 L/yr |
Senior Software Engineer
125
salaries
| ₹0 L/yr - ₹0 L/yr |
Manufacturing Engineer
88
salaries
| ₹0 L/yr - ₹0 L/yr |
Software Engineer
87
salaries
| ₹0 L/yr - ₹0 L/yr |
Mechanical Engineer
61
salaries
| ₹0 L/yr - ₹0 L/yr |
Lam Research
KLA
ASML
Entegris