Algorithm - Interview Questions and Answers for 'Google' - 2 question(s) found - Order By Newest _{} Q1. Given a graph, find if it represents a tree Algorithm ^{2017-03-03 14:41:06} ^{}

^{This question was recently asked at 'Google'.This question is still unanswered. Can you please provide an answer.} Help us improve. Please let us know the company, where you were asked this question : _{ Like Discuss Correct / Improve Asked in 1 CompaniesCorrectionDuplicate of Another QuestionCompany where this question was AskedSuggestion} Related Questions Can you provide some implementation of a Dictionary having large number of words ? What is the difference between Graph's Breadth first and Depth First algorithm ? In a Linked list with sorted numbers, insert a new numbers while maintaining the sort order. What are the pre-requisite for the collection to perform Binary Search ? 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. Explain various Searching and Sorting Algorithms ? Write an algorithm / java program for Heap Sort ? _{} Q2. Write code to sort an array. Algorithm ^{2018-07-04 16:15:16} ^{}

Ans. https://www.geeksforgeeks.org/arrays-sort-in-java-with-examples/ Help us improve. Please let us know the company, where you were asked this question : _{ Like Discuss Correct / Improve array sorting Asked in 16 Companies basic frequentCorrectionDuplicate of Another QuestionCompany where this question was AskedSuggestion} Related Questions Collections.sort can only be performed on ..
a. Set
b. List
c. Map
d. Any Collection implementation In what order the elements of a HashSet are retrieved ? If I try to add Enum constants to a TreeSet, What sorting order will it use ? 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 ? Explain various Searching and Sorting Algorithms ? Write an algorithm / java program for Heap Sort ? Write any sorting algorithm. Explain bubble sort. Explain different sorting algorithms and Big O of each