Filter interviews by
Be the first one to contribute and help others!
A generic swap function swaps two values of any data type.
The function should take two parameters of any data type.
Use a temporary variable to store the value of one parameter.
Assign the value of the second parameter to the first parameter.
Assign the value of the temporary variable to the second parameter.
Search for an element in a rotated sorted linked list.
Find the pivot point where the list is rotated.
Divide the list into two sublists based on the pivot point.
Perform binary search on the appropriate sublist.
Handle edge cases such as empty list and list with only one element.
Search an element in a rotated sorted array
Find the pivot point where the array is rotated
Divide the array into two sub-arrays based on pivot point
Perform binary search on the appropriate sub-array
Repeat until element is found or sub-array size is 1
Find 5 missing numbers in an array of size 95 containing numbers in range 1 to 100.
Create a boolean array of size 100 and mark the present numbers
Iterate through the boolean array and find the missing numbers
Alternatively, use a HashSet to store the present numbers and find the missing ones
Given a Sudoku board, find possible numbers for an empty cell.
Iterate through empty cells and check possible numbers using row, column, and box constraints.
Use a set to keep track of possible numbers for each empty cell.
Return the set of possible numbers for the given empty cell.
Find integer average of 4 unsigned integers without typecasting
Add all the integers and divide by 4
Use bit shifting to divide by 4
Handle overflow by using long long data type
Use unsigned int data type for input
Code to identify 32 bit or 64 bit architecture of a processor
Check if the operating system is 32 bit or 64 bit
If OS is 32 bit, processor is 32 bit
If OS is 64 bit, check if processor supports 64 bit architecture
Use CPUID instruction to check if processor supports 64 bit architecture
Convert binary number to base 64 integer
Divide the binary number into groups of 6 bits
Convert each group of 6 bits to decimal
Map the decimal value to the corresponding base 64 character
Concatenate the base 64 characters to form the final integer
I was interviewed before Dec 2020.
Round duration - 60 minutes
Round difficulty - Easy
This was a 60 minute technical round involving questions based on data structures, OOPS concepts, DBMS and projects that I had mentioned in my resume.
Calculate the Nth term in the Fibonacci sequence, where the sequence is defined as follows: F(n) = F(n-1) + F(n-2)
, with initial conditions F(1) = F(2) = 1
.
Calculate the Nth Fibonacci number efficiently using recursion or dynamic programming.
Implement a recursive function to calculate the Nth Fibonacci number.
Use memoization to store previously calculated Fibonacci numbers for efficiency.
Consider using dynamic programming to optimize the solution.
Handle edge cases such as N = 1 or N = 2 separately.
Ensure the solution works efficiently for large values of N (up to 10000).
Operator overloading in OOP allows custom behavior for operators like +, -, *, etc.
Operator overloading is a feature in OOP that allows defining custom behavior for operators
Example: Overloading the + operator to concatenate strings or add two numbers
Example: Overloading the * operator to perform matrix multiplication
Function overloading is when multiple functions have the same name but different parameters or return types.
Allows multiple functions with the same name but different parameters or return types
Helps improve code readability and maintainability
Example: int add(int a, int b) and float add(float a, float b)
C is a procedural programming language while C++ is a multi-paradigm programming language with object-oriented features.
C is a procedural programming language while C++ supports both procedural and object-oriented programming.
C does not support classes and objects while C++ does.
C does not have built-in support for exception handling while C++ does.
C does not have namespaces while C++ does.
C does not have function over
Round duration - 45 minutes
Round difficulty - Easy
HR round that lasted for 45 minutes. Did brainstorming on puzzles and HR asked questions to know more about me.
Tips : During HR, think before you speak, they can catch any word that you speak. Prepare well for aptitude, as they shortlist less people after the test. Ask good questions during the end of the interviews. It might impress them. So prepare for it before going for the interview. Lastly, don’t be nervous, HRs are only trying to make you nervous during the interview as a part of the stress test.
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 was interviewed before Dec 2020.
Round duration - 60 minutes
Round difficulty - Medium
This was a 60 minute technical round where the interviewer asked programming based questions and questions on DBMS concepts.
Given an array of 'N' non-negative integers and an integer 'K', your task is to find the maximum elements for each subarray of size 'K'.
The first line contains...
Find the maximum elements for each subarray of size 'K' in an array of non-negative integers.
Iterate through the array and maintain a deque to store the indices of elements in decreasing order.
Pop elements from the deque if they are out of the current window of size 'K'.
The front of the deque will always have the index of the maximum element in the current window.
ACID properties are a set of properties that guarantee the reliability of transactions in database management systems.
Atomicity ensures that either all operations in a transaction are completed successfully or none of them are. For example, transferring money from one account to another should either be completed in full or not at all.
Consistency ensures that the database remains in a consistent state before and after ...
Write-ahead logging is a technique used in DBMS to ensure that changes are recorded in the log before they are applied to the database.
Write-ahead logging ensures that changes are first written to the log file before being applied to the database to maintain data integrity.
It helps in recovering the database in case of a system crash or failure by replaying the log entries to bring the database back to a consistent sta...
Deadlock avoidance schemes are strategies used to prevent deadlocks in a system.
Banker's algorithm: Ensures that the system will never enter an unsafe state by keeping track of available resources and only granting a request if it does not lead to a deadlock.
Wait-die and Wound-wait: Two deadlock prevention schemes used in transaction processing systems to avoid deadlocks by allowing transactions to wait or abort based ...
A clustered index is a type of index that sorts and stores the data rows in the table based on their key values.
Defines the order in which data is physically stored in a table
Only one clustered index per table
Helps in improving the performance of queries that involve range searches or sorting
Example: Clustered index on a table's primary key
Round duration - 60 minutes
Round difficulty - Easy
This was a 60 minute technical round where the interviewer asked data structure based questions, questions on OOPS and OS concepts.
A virtual function in C++ is a function that is declared within a base class and is redefined by a derived class.
Virtual functions allow a function to be overridden in a derived class.
They are used in polymorphism to achieve runtime binding.
The base class function must be declared as virtual for dynamic binding to occur.
Example: virtual void display() = 0; // pure virtual function
malloc() is used to dynamically allocate memory in C, while free() is used to release allocated memory.
malloc() allocates a block of memory of specified size and returns a pointer to the beginning of the block.
free() deallocates the memory previously allocated by malloc() or calloc().
Example: int *ptr = (int*)malloc(5 * sizeof(int)); // Allocates memory for 5 integers
Example: free(ptr); // Deallocates the memory alloca
Structure padding is the concept of adding empty bytes to a structure to align its data members on memory boundaries.
Structure padding is done to optimize memory access and improve performance.
Padding is necessary because most processors require data to be aligned on specific memory boundaries for efficient access.
For example, if a structure contains a char followed by an int, padding may be added after the char to ali
Round duration - 30 minutes
Round difficulty - Easy
HR based round that lasted for 30 minutes. The interviewer asked question to know more about 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.
I was interviewed before Dec 2020.
Round duration - 90 minutes
Round difficulty - Easy
Online test had 6 parts-psychometric test, aptitude, logical, English, computer skills and 2 coding questions. Time given to us was 90 minutes. Paper was quite lengthy and of average difficulty level. I was able to complete all the sections, but only one coding question.
You are given a string STR
which contains alphabets, numbers, and special characters. Your task is to reverse the string.
STR = "abcde"
"e...
Reverse a given string containing alphabets, numbers, and special characters.
Iterate through the string from the end to the beginning and append each character to a new string.
Use built-in functions like reverse() or StringBuilder in languages like Python or Java for efficient reversal.
Handle special characters and numbers while reversing the string.
Ensure to consider the constraints provided in the problem statement.
T...
Round duration - 60 minutes
Round difficulty - Medium
Firstly the interviewer asked me to introduce myself after he introduced himself. Since i went there as experienced guy he asked me about my workings in the current company. After that,he asked some programming questions, tested my concepts of DBMS and OOPS, and some puzzles.
Given an undirected and disconnected graph G(V, E) where V vertices are numbered from 0 to V-1, and E represents edges, your task is to output the BFS traversal starting from the ...
BFS traversal in a disconnected graph starting from vertex 0.
Implement BFS algorithm to traverse the graph starting from vertex 0.
Explore neighbor nodes first before moving to the next level neighbors.
Consider the bidirectional nature of edges in an undirected graph.
Output the BFS traversal sequence for each test case in a separate line.
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 efficient prime number identification
Optimize by only checking up to the square root of N for divisors
BCNF is a normal form in database management systems that ensures all determinants are candidate keys.
BCNF stands for Boyce-Codd Normal Form.
It is a stricter version of 3NF (Third Normal Form).
In BCNF, every determinant must be a candidate key.
It helps in reducing redundancy and anomalies in the database.
Example: If a table has columns A, B, and C, and A determines B and B determines C, then it is not in BCNF unless A
C is a procedural programming language while C++ is an object-oriented programming language with features like classes and inheritance.
C is a procedural programming language, while C++ is a multi-paradigm language with support for object-oriented programming.
C does not support classes and objects, while C++ does.
C uses structures for data organization, while C++ uses classes.
C does not have features like inheritance an...
Round duration - 60 minutes
Round difficulty - Easy
Again 2nd round started with an introduction from both sides. Then he started asking questions from resume itself. Working in the current company and all the projects that i have done. Few simple puzzles, OOPs concepts (with proper explanation and coding) and some database related questions(questions were easy you just need to brush up the basics). Some keywords related questions from C,C++,Java(usual questions like static ,final, abstract etc.). That was the 2nd round. Then I was called for the 3rd Round. Before 3rd round they also served tasty lunch.
Given a binary tree of integers, your task is to output the right view of the tree.
The right view of a binary tree includes the nodes that are visible when the tree is observed...
The task is to output the right view of a binary tree, which includes the nodes visible when observed from the right.
Traverse the tree level by level and keep track of the rightmost node at each level.
Use a queue for level order traversal and a map to store the rightmost nodes.
Print the values of the rightmost nodes stored in the map as the right view of the tree.
Round duration - 45 minutes
Round difficulty - Easy
After that he asked me what I knew about SAP and there products(Please do read all about SAP and there products-not all but at least some famous products like ERP). Then he asked me one puzzle.
Round duration - 45 minutes
Round difficulty - Easy
The round started with our Introduction to each other. After that interviewer asked me whether I do online shopping or not. I said yes then he asked me to design the online shopping portal using ER-Diagram . Then he asked me to create all the tables and populate it with data. Later on he asked me to normalize it. After all of this he asked me some simple puzzles and current salary and notice period. That was the 4th round.
After that I was asked to attend the final round and before 5th round they served snacks and tea to all of us.
Yes, I can design an ER diagram for an online shopping portal.
Entities: User, Product, Order, Payment, Cart
Relationships: User places Order, Order contains Product, Payment for Order, User has Cart
Attributes: User (id, name, email), Product (id, name, price), Order (id, date), Payment (id, amount)
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 was interviewed before Dec 2020.
Round duration - 60 minutes
Round difficulty - Easy
The test had a time limit. Every 10 minutes you had to do at least 4 questions. It was quite fast paced. The questions were from basic coding, aptitude and debugging.
Tips: Learn to be fast at coding. Practice a lot of aptitude questions. Have a decent knowledge of basic coding.
Given a Singly Linked List of integers, your task is to reverse the Linked List by altering the links between the nodes.
The first line of input is an intege...
Reverse a singly linked list by altering the links between nodes.
Iterate through the linked list and reverse the links between nodes
Use three pointers to keep track of current, previous, and next nodes
Update the next pointer of each node to point to the previous node
Given a string S
of length L
, determine the length of the longest substring that contains no repeating characters.
"abac...
Find the length of the longest substring without repeating characters in a given string.
Use a sliding window approach to keep track of the longest substring without repeating characters.
Use a hashmap to store the index of each character as it appears in the string.
Update the start index of the window when a repeating character is found.
Calculate the maximum length of the substring as the window slides through the strin
Round duration - 60 minutes
Round difficulty - Easy
The interviewer started off by asking basic sorting questions. Followed by data structures and algorithms. And DBMS related questions in the end.
Tips: Have a good presence of mind. Understand the question asked properly. Be confident and keep discussing. Don't get nervous and solve the questions incorrectly. Have good grip over topics like sorting, DS, Algorithms and DBMS.
You are given a binary tree consisting of distinct integers and two nodes, X
and Y
. Your task is to find and return the Lowest Common Ancestor (LCA) of these two nodes...
Find the Lowest Common Ancestor (LCA) of two nodes in a binary tree.
Traverse the binary tree to find the paths from the root to nodes X and Y.
Compare the paths to find the last common node, which is the LCA.
Handle cases where one node is an ancestor of the other.
Consider edge cases like when X or Y is the root node.
Implement a recursive or iterative solution to find the LCA efficiently.
You are given a permutation of 'N' integers. A sequence of 'N' integers is considered a permutation if it includes all integers from 1 to 'N' exactly once. Your task is ...
The task is to rearrange a given permutation of 'N' integers to form the lexicographically next greater permutation.
Iterate from right to left to find the first element that is smaller than the element to its right.
Swap this element with the smallest element to its right that is greater than it.
Reverse the elements to the right of the swapped element to get the lexicographically next greater permutation.
Round duration - 30 minutes
Round difficulty - Easy
The round was based around my over all personality. They checked how would I be an asset to their company. They analyzed my core values and capabilities of working in a team.
Tips: Show that you are willing to work in a team. Be confident and polite. Express your feelings and passion towards your job and the company. Explain your college extra curricular activities well.
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 was interviewed before Dec 2020.
Round duration - 60 minutes
Round difficulty - Easy
This was a technical interview round which lasted for 60 minutes. Questions based on DSA, OS and DBMS were discussed.
You are provided with an integer 'N'. Your task is to calculate and print the factorial of 'N'. The factorial of a number 'N', denoted as N!, is the product of all ...
Calculate and print the factorial of a given integer 'N'.
Iterate from 1 to N and multiply each number to calculate factorial
Handle edge cases like N=0 or N=1 separately
Use recursion to calculate factorial efficiently
As the Government ramps up vaccination drives to combat the second wave of Covid-19, you are tasked with helping plan an effective vaccination schedule. Your goal is...
Maximize the number of vaccines administered on a specific day while adhering to certain rules.
Given n days, maxVaccines available, and a specific dayNumber, distribute vaccines to maximize on dayNumber
Administer positive number of vaccines each day with a difference of 1 between consecutive days
Ensure sum of vaccines distributed does not exceed maxVaccines
Output the maximum number of vaccines administered on dayNumber
A semaphore is a synchronization construct used to control access to a shared resource by multiple processes or threads.
Semaphores can have an integer value representing the number of available resources.
They can be used to implement mutual exclusion and synchronization between processes.
Examples include binary semaphores (mutexes) and counting semaphores.
Operations on semaphores include wait (P) and signal (V).
RDBMS is a type of DBMS that manages data in a structured format using tables with relationships.
RDBMS enforces referential integrity through foreign keys, while DBMS does not.
RDBMS supports ACID properties (Atomicity, Consistency, Isolation, Durability), while DBMS may not.
RDBMS allows for normalization of data to reduce redundancy, while DBMS does not have this feature.
Examples of RDBMS include MySQL, Oracle, SQL Ser...
Round duration - 60 minutes
Round difficulty - Easy
A 60 minute technical round to test programming concepts. Questions on DBMS, OOPS, OS were also discussed.
Sort the given unsorted array consisting of N non-negative integers in non-decreasing order using the Bubble Sort algorithm.
The first line contains an integer 'T' r...
Bubble Sort algorithm is used to sort an array of non-negative integers in non-decreasing order.
Iterate through the array and compare adjacent elements, swapping them if they are in the wrong order.
Repeat this process until the array is sorted.
Time complexity of Bubble Sort is O(n^2) in worst case.
Space complexity of Bubble Sort is O(1) as it is an in-place sorting algorithm.
You are given a sequence of numbers, ARR
. Your task is to return a sorted sequence of ARR
in non-descending order using the Merge Sort algorithm.
The Merge Sort...
Implement Merge Sort algorithm to sort a sequence of numbers in non-descending order.
Divide the input array into two halves recursively until each array has only one element.
Merge the sorted halves to produce a completely sorted array.
Time complexity of Merge Sort is O(n log n).
Example: Input: [3, 1, 4, 1, 5], Output: [1, 1, 3, 4, 5]
Normalization is the process of organizing data in a database to reduce redundancy and improve data integrity.
Normalization involves breaking down a database into smaller, more manageable tables.
It helps in reducing data redundancy by storing data in a structured way.
There are different normal forms such as 1NF, 2NF, 3NF, BCNF, etc., each with specific rules to follow.
Normalization ensures data integrity and reduces th...
Round duration - 40 minutes
Round difficulty - Easy
This was a HR round. The interviewer asked me a number of questions about myself and gave a puzzle as well to solve.
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 was interviewed before Jan 2021.
Round duration - 100 minutes
Round difficulty - Easy
Sections in test :
1 Psychometric Test
2. Analytical Aptitude
3 Logical Reasoning
4 Two coding Questions
5.Pattern Recognition
6.Essay writing
Tips :
1. Do the coding Question first ,they are mot important ,if your code doesn't run you are disqualified.
2. Practice on leetcode.
3. Sectional Cutoff
Given a binary tree of integers, return the level order traversal of the binary tree.
The first line contains an integer 'T', representing the number of te...
The task is to implement a function that returns the level order traversal of a binary tree given in level order.
Create a queue to store nodes for level order traversal
Start with the root node and enqueue it
While the queue is not empty, dequeue a node, print its value, and enqueue its children
Repeat until all nodes are traversed
Round duration - 60 minutes
Round difficulty - Medium
This was a technical round where the interviewer asked me questions on data structures, database management system, SQL queries, cloud computing concepts and puzzles. We also had a discussion on our projects.
You are given a directed weighted graph with 'N' vertices, labeled from 1 to 'N', and 'M' edges. Each edge connects two nodes 'u' and 'v' with a weight 'w', representing t...
The Floyd Warshall algorithm is used to find the shortest paths between all pairs of vertices in a graph, including graphs with negative edge weights.
The algorithm works by considering all pairs of vertices and all intermediate vertices to find the shortest path.
It can handle graphs with negative edge weights, but not negative weight cycles.
The time complexity of the algorithm is O(N^3), where N is the number of vertic...
The database design for an ATM system should include tables for users, accounts, transactions, and ATM machines.
Create a table for users with fields like user_id, name, pin, etc.
Create a table for accounts with fields like account_id, user_id, balance, etc.
Create a table for transactions with fields like transaction_id, account_id, amount, date, etc.
Create a table for ATM machines with fields like atm_id, location, sta
Public cloud is shared infrastructure available to anyone, while private cloud is dedicated infrastructure for a single organization.
Public cloud is accessible to multiple organizations or users, while private cloud is exclusive to a single organization.
Public cloud services are provided over the internet, while private cloud services can be hosted on-premises or in a dedicated data center.
Public cloud offers cost-effe...
Round duration - 60 minutes
Round difficulty - Easy
Technical Interview round that lasted for 60 minutes. Questions on data structures, DBMS, OS and puzzles were discussed.
Given a Singly Linked List of integers, your task is to reverse the Linked List by altering the links between the nodes.
The first line of input is an intege...
Reverse a singly linked list by altering the links between nodes.
Iterate through the linked list and reverse the links between nodes
Use three pointers to keep track of current, previous, and next nodes
Update the links between nodes to reverse the list
Return the head of the reversed linked list
Primary key uniquely identifies each record in a table, while unique key ensures that all values in a column are distinct.
Primary key does not allow NULL values, while unique key allows one NULL value.
A table can have only one primary key, but multiple unique keys.
Primary key is automatically indexed, while unique key may or may not be indexed.
Example: In a table of students, student ID can be a primary key as it uniqu...
Query to find the nth highest salary in a database
Use the ORDER BY clause to sort salaries in descending order
Use the LIMIT clause to specify the nth highest salary
Consider handling cases where there may be ties for the nth highest salary
AES is a more secure and efficient cipher compared to DES.
AES has a block size of 128 bits, while DES has a block size of 64 bits.
AES supports key sizes of 128, 192, or 256 bits, while DES supports only 56-bit keys.
AES is considered more secure and efficient than DES due to its stronger encryption algorithm and larger key sizes.
Round duration - 30 minutes
Round difficulty - Easy
The lady was tough and showed her intent in the PPT as well. She asked a number of questions to know more about 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.
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
based on 7 reviews
Rating in categories
Senior Software Engineer
7
salaries
| ₹0 L/yr - ₹0 L/yr |
Software Engineer
5
salaries
| ₹0 L/yr - ₹0 L/yr |
Senior QA Engineer
4
salaries
| ₹0 L/yr - ₹0 L/yr |
Principal QA Engineer
4
salaries
| ₹0 L/yr - ₹0 L/yr |
Senior Site Reliability Engineer
4
salaries
| ₹0 L/yr - ₹0 L/yr |
Zoho
Tally Solutions
QuickBooks
SAP