i
Solera
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
Find median of 2 sorted arrays in O(log N) time complexity and O(1) space complexity
Use binary search to find the partition point in both arrays
Calculate the median based on the partition point and array sizes
Adjust the partition points based on the median value
Repeat until the partition points are at the median
Handle edge cases such as empty arrays and uneven array sizes
Anagram of strings in O(1) space complexity
Use a fixed size array of integers to store the frequency of characters in the first string
Iterate through the second string and decrement the frequency of each character in the array
If all the frequencies are zero, then the strings are anagrams
Return true or false accordingly
Level order traversal of a tree using Queue
Create a queue and add the root node to it
While the queue is not empty, remove the front node and print its value
Add the left and right child nodes of the removed node to the queue
Repeat until the queue is empty
Reverse level order traversal of a tree using Queue
Create a queue and push the root node into it
While the queue is not empty, pop the front node and push its children into the queue
Add the popped node to a stack
Once the queue is empty, pop elements from the stack and print them
BFS and DFS are graph traversal algorithms. BFS explores nodes level by level while DFS explores nodes depth by depth.
BFS uses a queue while DFS uses a stack or recursion.
BFS is optimal for finding shortest path while DFS is optimal for finding a path between two nodes.
BFS requires more memory as it stores all the nodes at each level while DFS requires less memory.
BFS can be used to find connected components while DFS
Find product of each element of an array except that element in O(N) time complexity without using / operation
Use prefix and suffix products
Multiply prefix and suffix products for each element to get the final product
Handle edge cases where array has 0 or 1 element separately
Recursively delete a linked list
Create a recursive function that takes the head of the linked list as input
Base case: if the head is null, return
Recursively call the function with the next node as input
Delete the current node
Recursively delete a linked list from the end.
Start from the head and recursively traverse to the end of the list.
Delete the last node and set the second last node's next pointer to null.
Repeat until the entire list is deleted.
Use a recursive function to implement the deletion process.
Recursively delete a tree by deleting all its child nodes and then the parent node.
Start from the leaf nodes and delete them first.
Then move up to the parent nodes and delete them.
Repeat until the root node is deleted.
Use post-order traversal to ensure child nodes are deleted before parent nodes.
Recursively delete elements from the end of an array.
Create a recursive function that removes the last element of the array.
Call the function recursively until the desired number of elements are removed.
Handle edge cases such as empty arrays and removing more elements than the array contains.
Floyd Warshall finds shortest path between all pairs of vertices while Djikstra finds shortest path from a single source.
Floyd Warshall is used for dense graphs while Djikstra is used for sparse graphs.
Floyd Warshall has a time complexity of O(n^3) while Djikstra has a time complexity of O((n+m)logn).
Floyd Warshall can handle negative edge weights while Djikstra cannot.
Floyd Warshall can detect negative cycles while Dj
There is no known algorithm to find shortest path in 2-D space in O(log N) time.
The best known algorithm for finding shortest path in 2-D space is Dijkstra's algorithm which has a time complexity of O(N^2).
Other algorithms like A* and Bellman-Ford have better time complexity but still not O(log N).
If the points are on a grid, Lee algorithm can be used which has a time complexity of O(N).
Design a system for putting newspapers using classes and functions
Create a Newspaper class with attributes like title, date, and content
Create a Publisher class with methods to publish and distribute newspapers
Create a Subscriber class with methods to subscribe and receive newspapers
Use inheritance to create different types of newspapers like daily, weekly, etc.
Implement a database to store newspaper information and ha
I believe practical experience is more valuable than higher studies.
I have gained valuable experience through internships and projects.
I prefer hands-on learning and problem-solving over theoretical knowledge.
I am constantly learning and improving my skills through online courses and workshops.
posted on 2 Dec 2016
I applied via Campus Placement and was interviewed in Dec 2016. There was 1 interview round.
Check if left child is less than right child in a binary tree
Traverse the tree recursively and compare left and right child values
Use a stack to traverse the tree iteratively and compare left and right child values
Return true if all left children are less than right children, else false
Use built-in string method to check substring presence for faster execution.
Use 'indexOf' method to check if substring is present in the main string.
If the method returns -1, the substring is not present.
If the method returns a non-negative integer, the substring is present.
posted on 2 Dec 2016
I applied via Campus Placement and was interviewed in Dec 2016. There were 6 interview rounds.
App performance analysis involves identifying and resolving bottlenecks to improve user experience.
Collect and analyze performance metrics such as response time, CPU usage, memory usage, and network latency.
Identify and prioritize bottlenecks based on impact on user experience and frequency of occurrence.
Implement optimizations such as caching, code refactoring, and database tuning.
Continuously monitor and test perform...
posted on 2 Dec 2016
I applied via Campus Placement and was interviewed in Dec 2016. There were 5 interview rounds.
posted on 2 Dec 2016
I applied via Campus Placement and was interviewed in Jan 2016. There were 5 interview rounds.
To find a loop in a directed graph, use Floyd's cycle-finding algorithm. To find the last element in a binary tree, traverse the tree and return the rightmost leaf node.
For finding a loop in a directed graph, use Floyd's cycle-finding algorithm which uses two pointers moving at different speeds.
To find the last element in a binary tree, traverse the tree recursively or iteratively and return the rightmost leaf node.
The question is about finding the last number in a circular queue that has the highest number of digits.
Implement a circular queue data structure
Iterate through the circular queue to find the last number with the highest number of digits
Compare the number of digits of each number in the circular queue
Keep track of the last number with the highest number of digits
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 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 4 reviews
Rating in categories
Associate Software Engineer
90
salaries
| ₹0 L/yr - ₹0 L/yr |
Associate Analyst
64
salaries
| ₹0 L/yr - ₹0 L/yr |
Senior Software Engineer
46
salaries
| ₹0 L/yr - ₹0 L/yr |
Software Engineer
35
salaries
| ₹0 L/yr - ₹0 L/yr |
Product Owner
27
salaries
| ₹0 L/yr - ₹0 L/yr |
CDK Global
Reynolds and Reynolds
Veeva Systems
Epicor Software Corporation