Filter interviews by
I applied via Approached by Company and was interviewed in Oct 2024. There were 2 interview rounds.
Work with API's and produce accurate responses based on a given problem statement. 3hrs to solve, completion when a correct post request is made.
Merge two sorted lists up to length k
Create a new list to store the merged result
Iterate through both lists up to length k, comparing elements and adding the smaller one to the new list
Handle cases where one list is shorter than k
Top trending discussions
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 applied via Job Portal and was interviewed in Mar 2021. There was 1 interview round.
posted on 15 Nov 2015
I applied via Campus Placement
Print all downward paths from any node in a binary tree with sum of elements equal to N.
Traverse the binary tree and keep track of the sum of elements in the path from root to current node.
If the sum equals N, print the path from root to current node.
Recursively traverse the left and right subtrees with updated sum.
Use a stack to keep track of the current path being traversed.
Example: Binary tree with root 1, left chil...
Yes, it is possible to get the accurate result from the given data.
The coordinates (i,j,k) where metallic balls are present can be determined by finding the set elements in both matrix1 and matrix2.
Additional data is not required as the given data is sufficient to determine the coordinates.
The coordinates can be obtained by iterating through the elements of matrix1 and matrix2 and checking for set elements.
posted on 15 Nov 2015
Backend server code for a tic tac toe game
Create a RESTful API using a framework like Express.js
Implement game logic to check for winning conditions
Use a database to store game state and user information
Handle user authentication and authorization
Implement real-time updates using WebSockets
Program to store and reconstruct a tree from a file with efficient techniques.
Use a recursive approach to traverse the tree and write each node to the file
Include information about the node's parent and children in the file
Use a unique identifier for each node to reconstruct the tree from the file
Use a data structure like a hash table to store the nodes and their identifiers for efficient reconstruction
posted on 23 Aug 2015
I applied via Campus Placement
To find n-k th element from last in a string of unknown length
Traverse the string to find its length
Calculate the position of n-k th element from last
Traverse the string again to find the element at calculated position
Count the number of unique occurrences in an array of strings.
Create a hash table to store the count of each string occurrence.
Iterate through the array and update the count in the hash table.
Count the number of unique occurrences by counting the number of keys in the hash table.
based on 2 interviews
Interview experience
based on 1 review
Rating in categories
Salesforce
Zendesk
Freshworks
Zoho