Algorith Questions
Algorith Questions
Algorith Questions
Form2-Alg-FINAL
Questions (Sorular)
1. Merge Sort is a stable sort. 2. Quick sort is an in-place sort. 3. The best
performance of binary tree sort is when data is in sorted or reverse sorted order.
4. All operations on a binary search tree take O(h) running time where h is the
height of the tree. 5. The recursive algorithm for merge sort uses combine and
conquer technique. Which of the up sentences are false?
1, 2, 3, 4,5
2, 3, 4,5
2,3
3, 4,5
2,4,5
1,3,4
4,5
https://docs.google.com/forms/d/e/1FAIpQLSeuNKvI6y2H6_sQCOaI4-f3VHOtA8XrCUdusGT_ynFEGLq-nw/formResponse 1/19
1/19/2021 Form2-Alg-FINAL
Suppose that: binary search tree node structure in the application as follows:
rootTree is the root node of the application. Some parts of the code below for
searching information are missing. First node name is start and last node name is
last. Match the missing parts with the options. a if(wanted <= rootTree-
>infotmation!=wanted) b while(rootTree != NULL && rootTree-
>information!=wanted){ c rootTree= rootTree->left; d rootTree= rootTree->right;
1-b;2-a;3-c;4-d;
1-a;2-b;3-c;4-d;
1-d;2-c;3-a;4-b;
NONE
Other:
https://docs.google.com/forms/d/e/1FAIpQLSeuNKvI6y2H6_sQCOaI4-f3VHOtA8XrCUdusGT_ynFEGLq-nw/formResponse 2/19
1/19/2021 Form2-Alg-FINAL
NONE
https://docs.google.com/forms/d/e/1FAIpQLSeuNKvI6y2H6_sQCOaI4-f3VHOtA8XrCUdusGT_ynFEGLq-nw/formResponse 3/19
1/19/2021 Form2-Alg-FINAL
NONE
https://docs.google.com/forms/d/e/1FAIpQLSeuNKvI6y2H6_sQCOaI4-f3VHOtA8XrCUdusGT_ynFEGLq-nw/formResponse 4/19
1/19/2021 Form2-Alg-FINAL
What tasks or task do the algorithm below algorithm in relation to the elements
in the two sided linked lists?
Search
NONE
Changing
Deletion
Sort
Adding
https://docs.google.com/forms/d/e/1FAIpQLSeuNKvI6y2H6_sQCOaI4-f3VHOtA8XrCUdusGT_ynFEGLq-nw/formResponse 5/19
1/19/2021 Form2-Alg-FINAL
It is wanted to add a node to the one-way linked list. The name of the node to be
added is ‘yildiz’. Some parts of the code below for adding node are missing. First
node name is start and last node name is last. Match the missing parts with the
options and write them in a specific format. a last->mark=NULL; b last=first; c
last->mark=ki; d fist->arka=NULL;
1-a;2-b;3-c;4-d;
1-c;2-a;3-b;4-d;
1-d;2-c;3-b;4-a;
1-b;2-c;3-a;4-d
NONE
https://docs.google.com/forms/d/e/1FAIpQLSeuNKvI6y2H6_sQCOaI4-f3VHOtA8XrCUdusGT_ynFEGLq-nw/formResponse 6/19
1/19/2021 Form2-Alg-FINAL
How may passes will be required to sort this data using radix sort. 12, 345, 121,
564, 2342, 231, 7, 989, 3231.
NONE
https://docs.google.com/forms/d/e/1FAIpQLSeuNKvI6y2H6_sQCOaI4-f3VHOtA8XrCUdusGT_ynFEGLq-nw/formResponse 7/19
1/19/2021 Form2-Alg-FINAL
NONE
a,b,c,d
b,c,d,a
c,d,a,b
d,a,b,c
c,d,b,a
d,c,b,a
https://docs.google.com/forms/d/e/1FAIpQLSeuNKvI6y2H6_sQCOaI4-f3VHOtA8XrCUdusGT_ynFEGLq-nw/formResponse 8/19
1/19/2021 Form2-Alg-FINAL
Stack
Queue
NONE
Assume a linked list has been created and the start pointer is referring the first
node of that linked list. Select the following code that can add a new node that
addresses hold by temp pointer, at beginning of that linked list. Temp is adding
node and start is: (temp is adding node, start is showing first node and node has
link and information parts.)
NONE
temp->link=start; start=temp;
start=temp; temp->link=start;
temp=start; temp=start->link;
start=temp->link; temp=start;
https://docs.google.com/forms/d/e/1FAIpQLSeuNKvI6y2H6_sQCOaI4-f3VHOtA8XrCUdusGT_ynFEGLq-nw/formResponse 9/19
1/19/2021 Form2-Alg-FINAL
O(logn)
O(n^2)
O(n^2 logn)
O(n^3)
NONE
Other:
https://docs.google.com/forms/d/e/1FAIpQLSeuNKvI6y2H6_sQCOaI4-f3VHOtA8XrCUdusGT_ynFEGLq-nw/formResponse 10/19
1/19/2021 Form2-Alg-FINAL
2,3
1,3,5
4,5
https://docs.google.com/forms/d/e/1FAIpQLSeuNKvI6y2H6_sQCOaI4-f3VHOtA8XrCUdusGT_ynFEGLq-nw/formResponse 11/19
1/19/2021 Form2-Alg-FINAL
ALL
1,3,4
4,6
1,5
NONE
https://docs.google.com/forms/d/e/1FAIpQLSeuNKvI6y2H6_sQCOaI4-f3VHOtA8XrCUdusGT_ynFEGLq-nw/formResponse 12/19
1/19/2021 Form2-Alg-FINAL
1. In Bubble sort, adjacent elements are compared and exchanged if out of order.
2. An unstable sort maintains the relative order of duplicate keys. 3. An in-place
sort requires only a negligible amount of storage for sorting. 4. Selection sort,
there are more swaps in a single pass. 5. If n elements have to be sorted using
selection sort, then total number of passes required is n-1 6. If input data is in
sorted order then time complexity of bubble sort is O(n). Which of the up
sentences are false?
https://docs.google.com/forms/d/e/1FAIpQLSeuNKvI6y2H6_sQCOaI4-f3VHOtA8XrCUdusGT_ynFEGLq-nw/formResponse 13/19
1/19/2021 Form2-Alg-FINAL
Pseudo-code of the algorithm deleting / removing node from the binary search
tree.Write the correct order them with no separator.
cdefgab
NONE
gecbadf
cebfadg
abcdefg
https://docs.google.com/forms/d/e/1FAIpQLSeuNKvI6y2H6_sQCOaI4-f3VHOtA8XrCUdusGT_ynFEGLq-nw/formResponse 14/19
1/19/2021 Form2-Alg-FINAL
ALL
1,3,5
NONE
1,3
3,4
https://docs.google.com/forms/d/e/1FAIpQLSeuNKvI6y2H6_sQCOaI4-f3VHOtA8XrCUdusGT_ynFEGLq-nw/formResponse 15/19
1/19/2021 Form2-Alg-FINAL
What should be there in the place of question mark to insert a new node after
the node pointed to by p in a doubly linked list. (temp is adding node, next is
pointer part of node showing next and prev is a pointer part of node showing
previous.)
NONE
p->prev
p->next->prev
Which of these statements will delete a node form the end of a doubly linked list,
if temp points to the last node.
NONE
temp->next->prev=NULL;
temp->prev->next=NULL;
temp->prev=NULL;
https://docs.google.com/forms/d/e/1FAIpQLSeuNKvI6y2H6_sQCOaI4-f3VHOtA8XrCUdusGT_ynFEGLq-nw/formResponse 16/19
1/19/2021 Form2-Alg-FINAL
Below code is for the insertion sort code. Fill the below code with the correct
order?
NONE
Other:
https://docs.google.com/forms/d/e/1FAIpQLSeuNKvI6y2H6_sQCOaI4-f3VHOtA8XrCUdusGT_ynFEGLq-nw/formResponse 17/19
1/19/2021 Form2-Alg-FINAL
y l
NONE
https://docs.google.com/forms/d/e/1FAIpQLSeuNKvI6y2H6_sQCOaI4-f3VHOtA8XrCUdusGT_ynFEGLq-nw/formResponse 18/19
1/19/2021 Form2-Alg-FINAL
Page 3 of 3
Back Submit
This content is neither created nor endorsed by Google. Report Abuse - Terms of Service - Privacy Policy
Forms
https://docs.google.com/forms/d/e/1FAIpQLSeuNKvI6y2H6_sQCOaI4-f3VHOtA8XrCUdusGT_ynFEGLq-nw/formResponse 19/19