# Computer Hardware & Software interview questions

“decide whether the enter should be accepted or not for a passcode, one number missing is permitted, can be missed several times, 18687 is the passcode, then 167 is accepted, the rest should be right...” |

“Onsite interview 1: A paper test, questions including Java syntax, SQL, JavaScript, code review. Java syntax question is: given a method: int exchange(int a), we need: if a == 1 return 2, if a...” |

“I have a log that consists of more than 100 million lines. Each line is just a data about user login, login time, etc. I want to sort them based on user login, and then if there is a tie based on...” |

“You have 8 balls. All are identical except one is slightly heavier. You have a balance. What is the minimum number of weighings required to find the heavier ball?” |

1 of 1 found helpful |

“Make a program that writes a Binary Search Tree to a file. Now create a program that reads those files and recreates a Binary Search Tree.” |

“Find the 20 longest strings in a text file.” |

“Assume that you are given the head and tail pointers of a doubly linked list where each node can also have a single child pointer to another similar doubly linked list. There are no cycles in this...” |

“You have a cake. How many straight cuts do you need to divide the cake into 8 equal pieces?” |

“Given a binary tree, how would you set the keys/values of all the nodes and their child pointers to null. No language restriction. Do it iteratively in O(N) time with O(1) space complexity where N...” |

“How to compute top k numbers in an array?” |

**61**–

**70**of

**38,961**Interview Questions