CS301
|
Consider Te Following Array 23 15 5 12 40 10 7
After The First Pass Of A Particular Algorithm The Array Looks Like 15 5 12 23 10 7 40
Name The Algorithm Used
|
Heap Sort
|
Selection Sort
|
Insertion Sort
|
Bubble Sort
|
D
|
CS301
|
We Are Given N Items To Build A Heap This Can Be Done With Successive Inserts
|
N-1
|
N
|
N+1
|
N^2
|
B
|
CS301
|
Which Of The Following Statement Concerning Heaps Is Not True?
|
Traversing A Heap In Order Provides Access To The Data In Numeric Or Alphabetical Order
|
Removing The Item At The Top Provides Immediate Access To The Key Value With Highest (Or Lowest) Priority
|
Inserting An Item Is Always Done At The End Of The Array But Requires Maintaining The Heap Property
|
A Heap May Be Stored In An Array
|
A
|
CS301
|
What Will Be Postfix Expression Of The Following Infix Expression? Infix Expression : A+B*C-D
|
Ab+C*D-
|
Abc*+D-
|
Abc+*D-
|
Abcd+*-
|
B
|
CS301
|
Mergesort Makes Two Recursive Calls. Which Statement Is True After These Recursive Calls Finish But Before The Merge Step?
|
Elements In The First Half Of The Array Are Less Than Or Equal To Elements In The Second Half Of The Array
|
None Of The Given Options
|
The Array Elements Form A Heap
|
Elements In The Second Half Of The Array Are Less Than Or Equal To Elements In The First Half Of The
Array
|
D
|
CS301
|
In The Worst Case Of Deletion In Avl Tree Requires ___________
|
Only One Rotation
|
Rotation At Each Non-Leaf Node
|
Rotation At Each Leaf Node
|
Rotations Equal To Log2 N
|
D
|
CS301
|
A Binary Tree With 33 Internal Nodes Has Links To Internal Nodes
|
31
|
32
|
33
|
66
|
B
|
CS301
|
Suppose Currentnode Refers To A Node In A Linked List (Using The Node Class With Member Variables Called Data And Nextnode). What Boolean Expression Will Be True When Cursor Refers To The Tail Node Of The List?
|
(Currentnode == Null)
|
(Currentnode->Nextnode == Null)
|
(Nextnode.Data == Null)
|
(Currentnode.Data == 0.0)
|
A
|
CS301
|
If We Have 1000 Sets Each Containing A Single Different Person. Which Of The Following Relation Will Be True On Each Set
|
Reflexive
|
Symmetric
|
Transitive
|
Associative
|
A
|
CS301
|
Searching An Element In An Avl Tree Take Maximum Time (Where N Is No. Of Nodes In Avl Tree)
|
1.44 Log2N
|
1.66 Log2N
|
Log2(N+1)
|
Log2(N+1) -1
|
A
|
CS301
|
In Which Of The Traversal Method The Recursive Calls Can Be Used To Traverse A Binary Tree ?
|
In Preorder Traversal Only
|
In Inorder Traversal Only
|
In Postorder Traversal Only
|
All Of The Given Options
|
A
|
CS301
|
When A Complete Binary Tree Represented By An Array Then For Any Array Element At Position I The Parent Is At Position
|
2I-1
|
2I
|
2I+1
|
Floor(I/2)
|
D
|
CS301
|
A Simple Sorting Algorithm Like Selection Sort Or Bubble Sort Has A Worst-Case Of
|
O(1) Time Because All Lists Take The Same Amount Of Time To Sort
|
O(N) Time Because It Has To Perform N Swaps To Order The List
|
O(N2) Time Because Sorting 1 Element Takes O(N) Time - After 1 Pass Through The List Either Of These Algorithms Can Guarantee That 1 Element Is Sorted
|
O(N3) Time Because The Worst Case Has Really Random Input Which Takes Longer To Sort
|
C
|
CS301
|
Which Of The Following Concept Is Not Associated With Stream?
|
Source
|
Template
|
Destination
|
State
|
B
|
CS301
|
Following Are The Linear Data Structures
|
Stacks
|
Queues
|
Both A & B
|
None Of The Above
|
C
|
CS301
|
If Numbers 5 222 4 48 Are Inserted In A Queue Which One Will Be Removed First?
|
48
|
4
|
222
|
5
|
D
|
CS301
|
Declare A Stack Of Characters While ( There Are More Characters In The Word To Read ){Read A Character; Push The Character On The Stack;} While ( The Stack Is Not Empty ){Pop A Character Off The Stack; Write The Character To The Screen;} Input "Apples"?
|
Selpa
|
Selppa
|
Apples
|
Aaappppplleess
|
B
|
CS301
|
Which Of The Following Is True About Arrays
|
We Can Increase The Size Of Arrays After Their Creation
|
We Can Decrease The Size Of Arrays After Their Creation
|
We Can Increase But Cant Decrease The Size Of Arrays After Their Creation
|
We Can Neither Increase Nor Decrease The Array Size After Their Creation
|
D
|
CS301
|
A Threaded Binary Tree Is A Binary Tree In Which Every Node That Does Not Have A Right Child Has A Thread (In Actual Sense A Link) To Its __________ Successor
|
Inorder
|
Levelorder
|
Preorder
|
Postorder
|
A
|
CS301
|
Which Of The Following Statement Is Not True About Threaded Binary Tree?
|
Right Thread Of The Right-Most Node Points To The Dummy Node
|
Left Thread Of The Left-Most Node Points To The Dummy Node
|
The Left Pointer Of Dummy Node Points To The Root Node Of The Tree
|
Left Thread Of The Right-Most Node Points To The Dummy Node
|
D
|