# Search Interview Questions

More than 3000 questions in repository.
There are more than 900 unanswered questions.
Have a video suggestion.
Click Correct / Improve and please let us know.
Label / Company      Label / Company / Text

 Q1. Given a graph, find if it represents a tree Algorithm
Ans. We can simply find it by checking the criteria of a tree. A tree will not contain a cycle, so if there is any cycle in the graph, it is not a tree. We can check it using another approach, if the graph is connected and it has V-1 edges, it could be a tree. Here V is the number of vertices in the graph

Help us improve. Please let us know the company, where you were asked this question :

Related Questions

Can you provide some implementation of a Dictionary having large number of words ?
In a Linked list with sorted numbers, insert a new numbers while maintaining the sort order.
What is the difference between Graph's Breadth first and Depth First algorithm ?
What are the pre-requisite for the collection to perform Binary Search ?
Explain various Searching and Sorting Algorithms ?
Write a program for LinkedList, with method to append node and traversing the list ?
Which sorting algorithm is used by Collections.sort() in Java ?
How to determine if the linked list has a cycle in it ?
Write an Algorithm for Graph Traversal ? The Graph has a loop.
Write an algorithm / java program for Heap Sort ?

 Q2. Write code to sort an array. Algorithm

Help us improve. Please let us know the company, where you were asked this question :

array  sorting     Asked in 16 Companies      basic        frequent

Related Questions

Collections.sort can only be performed on ..

a. Set
b. List
c. Map
d. Any Collection implementation
If I try to add Enum constants to a TreeSet, What sorting order will it use ?
In what order the elements of a HashSet are retrieved ?
Explain various Searching and Sorting Algorithms ?
Which sorting algorithm is used by Collections.sort() in Java ?
If we add Enum constants to a sorted collection ( Treemap , TreeSet ), What will be the order in which they will be maintained ?
Write an algorithm / java program for Heap Sort ?
Write any sorting algorithm.
Explain bubble sort.
Explain different sorting algorithms and Big O of each

## Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.