Data Structures and Algorithms Quiz
English
Expert
A quiz about data structures and algorithms. This quiz would need an advance level of knowledge on programming, algorithms, data structures and computer systems.
Description
Computer Science, English, Programming, Data structures, Algorithms, Complexity, Search algorithms, Sorting algorithms, Trees, Arrays, Queue, Graph
Tags
50
Questions
30 sec
Per question
9:40
Average time
Disqualified
Contest Score
4.4
Community Rating
56
Participants
Unfortunately, this test will not be able to receive a prize:
Not an original test. Questions, answers, explanations were copied from an existing test. E.g.: “#q1” <= https://books.google.co.ve/books?id=NqBDDAAAQBAJ&pg=PA1&lpg=PA1&dq=The+OS+of+a+computer+may+periodically+collect+all+the+free+memory+space+to+form+a+contiguous+block+of+free+space.+This+is+know+as&source=bl&ots=vKu6ioZ-AS&sig=ACfU3U1_LgM9GG8sWf16j_UUsRtq50Kxog&hl=en&sa=X&ved=2ahUKEwjkoazk95PqAhV-QjABHe93B9cQ6AEwBXoECAoQAQ#v=onepage&q=The%20OS%20of%20a%20computer%20may%20periodically%20collect%20all%20the%20free%20memory%20space%20to%20form%20a%20contiguous%20block%20of%20free%20space.%20This%20is%20know%20as&f=false, “#q3” <= https://books.google.co.ve/books?id=NqBDDAAAQBAJ&pg=PA1&lpg=PA1&dq=The+OS+of+a+computer+may+periodically+collect+all+the+free+memory+space+to+form+a+contiguous+block+of+free+space.+This+is+know+as&source=bl&ots=vKu6ioZ-AS&sig=ACfU3U1_LgM9GG8sWf16j_UUsRtq50Kxog&hl=en&sa=X&ved=2ahUKEwjkoazk95PqAhV-QjABHe93B9cQ6AEwBXoECAoQAQ#v=onepage&q=The%20OS%20of%20a%20computer%20may%20periodically%20collect%20all%20the%20free%20memory%20space%20to%20form%20a%20contiguous%20block%20of%20free%20space.%20This%20is%20know%20as&f=false, “#q6” <= https://books.google.co.ve/books?id=NqBDDAAAQBAJ&pg=PA1&lpg=PA1&dq=The+OS+of+a+computer+may+periodically+collect+all+the+free+memory+space+to+form+a+contiguous+block+of+free+space.+This+is+know+as&source=bl&ots=vKu6ioZ-AS&sig=ACfU3U1_LgM9GG8sWf16j_UUsRtq50Kxog&hl=en&sa=X&ved=2ahUKEwjkoazk95PqAhV-QjABHe93B9cQ6AEwBXoECAoQAQ#v=onepage&q=The%20OS%20of%20a%20computer%20may%20periodically%20collect%20all%20the%20free%20memory%20space%20to%20form%20a%20contiguous%20block%20of%20free%20space.%20This%20is%20know%20as&f=false, etc.
I would like to say I didn't copy from the book(site) mention when preparing the quiz. I prepared my quiz using notes and excercises from the course I attended. Sure I can see the resemblance with my questions but anything would resemble something on the Internet.
Thank you for the comment and I appreciate all the work you are doing.
Let's say you have an NxN matrix M where N is the amount of nodes:
• M[i, j] = number of directed edges going from node i to node j
• M[i, i] could has an object representing the information of node i
• M[i, j] = M[j, i] for undirected graphs
> Bubble sort is a stable algorithm:
https://en.m.wikipedia.org/wiki/Bubble_sort
Insertion sort algorithm is stable:
https://en.m.wikipedia.org/wiki/Insertion_sort
Heap sort is not stable:
https://en.m.wikipedia.org/wiki/Heapsort
https://graph.subwiki.org/wiki/Adjacency_matrix
And yeah, its ambigous and totally not what I intended.
The smallest element of an array's index is called its lower bound or bottom of the areay, mostly 0 since its index starts at 0.
The small element? Maybe, you meant the smalLEST INDEX?
Two options "O(n²/2)" and "O(n²/4)" are equal, so this question has two correct answers.
This question appears twice in quiz.
The second appearence:
The worst case of quick sort has order...
It is correct, the only correct option in it is "O(n²)".
And once again about complexity:
Merging 4 sorted files containing 50, 10, 40, 25 records will take time complexity of...
All options "O(200)", "O(100)", "O(250)" and "O(125)" are equal too.
Read here: https://en.wikipedia.org/wiki/Big_O_notation
Worst case performance of Quick Sort has the order O(n²).
Merging files question was not meant as linear Big O representation, it was refering as it already sorted, it would take a total time complexity of all files.
Obviously, the correct answer is selection or insertion sort, but your answer is quick sort.
P = 4x³ + 6x² + 9x + 34 is
Here, answer is correct, but explanation is wrong. What best scenario? We need to calculate P = 4x³ + 6x² + 9x + 34 for any x given.
Correct explanation would be:
Let T be temporary variable.
T=4*x
T=T+6
T=T*x
T=T+9
T=T*x
T=T+34
Now T is the result of calculating the polynomial, and we used 3 additions and 3 multiplications.
Your answer is inorder successor.
But why not to replace it with inorder predecessor? All tree structure will remain correct.
Your answer is postorder.
But postorder is just list of nodes. How to convert in into tree mirror image (which is tree)?
What is direct search?