Interview questions
Team Lead/ Tech Lead interview questions – page 7
3,203 questions. Tap “Show answer” to check yourself.
-
Check Whether binary representation of number is palindrome or not example
-
Given a very big file of words, a word in each line, sort the words. Please provide the algorithm and explanation .
-
5. You have two threads T1 and T2 they are reader and writer respectively. With some specification: ADDNEW.Process PROCESS.SET PROCESS.RESET ENTER CS EXIT CS LOOP EXIT LOOP WAIT# PROCESS
-
Design a data structure to provide the mathematical operations +, - ,/ , * etc for the very very large numbers. Also, implement the + function for two such very very large numbers ...say numbers with 1 Million digits.
-
Pointer to head node of a linked list is given, reverse the first two nodes of the list.
-
An efficient method to count the number of occurrences of a number in a sorted array
-
Given an array of integers, for each index i, you have to swap the value at i with the first value smaller than A[ i ] that comes after index i
-
Write code for a method that takes two arrays s arguments and returns true if one array is subarray of the other array, otherwise returns false.
-
A data structure is required for storing a set of integers such that each of the following operations can be done in (log n) time, where n is the number of elements in the set.
-
How do you determine two strings are anagram. The algo should be better than (nlogn) and should consider the wide characters also.
-
Given a linked list structure where every node represents a linked list and contains two pointers of its type: (i) pointer to next node in the main list. (ii) pointer to a linked list where this node is head.
-
Given a string of the form a2b3 produce the string aabbb from it
-
In a binary max heap containing n numbers, the smallest element can be found in time ?
-
How would you implement a map (not a map of like a city... just a set of keys which "map" to values") - Give two data structures you could use - What is average and worst case insert time, delete time, look up time - What are pro...
-
What is a circular queue? Why is it better than a normal queue? and Give some practical Examples of usage of circular queue
-
AVL tree vs Red Black Tree
-
Merge 2 sorted linked list.
-
How to Implement stack using priority queue?
-
Design the data structures for an online book reader system ?
-
How to allocate memory to a string at run time and read character by character?
-
I/P: Binary tree. O/P: Single Linked List where each node is the sum of the nodes in the same level of the binary tree.
-
What is Ternary Search ? They will be fast to Binary search or not.
-
Given an n-ary tree , you have to search for an element in the tree without using recursion. int FindNum(node *head, int num) {
-
You are given a bst where each node has a int value , parent pointer , and left and right pointers , write a function to find a path with a given sum value. Path can go from left subtree tree , include root and go to right tree as well . we need t...
-
Given a string *Str of ASCII characters, write the pseudocode to remove the duplicate elements present in them. For example, if the given string is "Potato", then, the output has to be "Pota". Additional constraint is, the algorithm has to be in-p...
-
Create a singly linked list from the Leaf nodes from a binary tree. Tree may be balanced or not. Linked List should be created in place (tree nodes should be used)
-
Write a function to output the minimum string to be appended to the given string such that the new string so formed is a palindrome.
-
Given a binary tree and two nodes, how do you check if there exist a path between them.
-
How do you find the largest repeating string and the number of times it repeats in a given string efficiently off-course !?
-
Given a binary tree convert it into double linked list