i
Zaco Computers Private Limited
Filter interviews by
Be the first one to contribute and help others!
I applied via Referral
Find A-B of two sorted arrays A and B in O(m+n) time complexity.
Create two pointers, one for each array, and compare the elements at those pointers.
If the element in A is smaller, add it to the result array and move the A pointer forward.
If the element in B is smaller, move the B pointer forward.
Repeat until one of the pointers reaches the end of its array.
Add any remaining elements in A to the result array.
Time comple...
The routine should output the elements of the inorder traversal of a binary tree one by one in each call.
Implement an inorder traversal algorithm recursively
Use a global variable or pass a reference to keep track of the current element
Call the routine repeatedly to get the next element in each call
Program to find minimum semesters required to complete courses with prerequisites
Create a graph with courses as nodes and prerequisites as edges
Use topological sorting to find the order of courses to be taken
Calculate the minimum number of semesters based on the order obtained
Handle cases where there are cycles in the graph
I applied via Campus Placement
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 2 Dec 2016
I applied via Campus Placement and was interviewed in Dec 2016. There were 6 interview rounds.
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 21 Aug 2016
I applied via Campus Placement
posted on 21 Aug 2016
I applied via Campus Placement
To test if every left child's value is less than the right child's value in a binary tree.
Traverse the binary tree using any traversal algorithm (e.g., in-order, pre-order, post-order)
Compare the value of each left child with its right child
If any left child's value is greater than or equal to its right child's value, return false
If all left child's values are less than their right child's values, return true
Cloning a linked list-like structure
Create a new node for each node in the original linked list
Set the value of the new node to the value of the corresponding node in the original linked list
Set the next pointer of the new node to the new node corresponding to the next node in the original linked list
Repeat the above steps until all nodes in the original linked list are cloned
To find the nth character in a stream of bytes, we need to read the stream byte by byte until we reach the nth position.
Start reading the stream byte by byte until you reach the nth position
Return the byte at the nth position
If the stream ends before reaching the nth position, return null or throw an exception
Rearrange a string to avoid consecutive same characters.
Iterate through the string and keep track of the previous character.
If the current character is the same as the previous, swap it with the next different character.
Repeat until no consecutive same characters are left.
The task is to find the next highest palindrome number given a number.
Convert the given number to a string
Check if the number is already a palindrome
If not, increment the number by 1 and check if it is a palindrome
Repeat the previous step until a palindrome is found
Canonicalizing a directory path involves simplifying and standardizing the path to remove any redundant or unnecessary elements.
Remove any consecutive slashes and replace them with a single slash
Remove any trailing slashes
Resolve any relative paths (e.g., '..' and '.')
Handle special cases like the root directory ('/')
Normalize the path by removing any unnecessary elements
posted on 21 Aug 2016
I applied via Campus Placement
posted on 22 Aug 2016
I applied via Campus Placement
based on 25 reviews
Rating in categories
Server Engineer
8
salaries
| ₹0 L/yr - ₹0 L/yr |
Business Development Manager
7
salaries
| ₹0 L/yr - ₹0 L/yr |
Search Engine Optimization and Digital Marketing Executive
7
salaries
| ₹0 L/yr - ₹0 L/yr |
Executive Accountant
7
salaries
| ₹0 L/yr - ₹0 L/yr |
Business Development Executive
4
salaries
| ₹0 L/yr - ₹0 L/yr |
Dell
HP India
Lenovo
Acer India