Frage 1
Frage
Choosing pivot and place all items smaller than pivot to the left and bigger ones to the
right, then repeat the same with two branches is similar to _____________ sort algorithm.
Frage 2
Frage
Inventor of merge sort is ?
Antworten
-
John von Neumann
-
Mr Merge
-
John Lennon
-
Professor Sortmerg
Frage 3
Frage
А collision occurs when ... ?
Antworten
-
two keys hash to the same table index.
-
two values hash to the same table index
-
two keys are hashed to big table inde and rehash needed
-
impossible to answer
Frage 4
Frage
What are the two parts of ADT?
Antworten
-
private, public
-
methods and data fields
-
Parent and Child
-
Int and Float
-
Queue and Stack
Frage 5
Frage
List two ways of organizing hashtable.
Frage 6
Frage
Which of them has more methods?
Antworten
-
Subclass
-
Superclass
-
Parentclass
-
Object
Frage 7
Frage
Indicate the relationship of HastableOpen and Entry classes?
Frage 8
Frage
The relationship when one class is defined inside the definition of another ?
Frage 9
Frage
Which of them is NOT an example of Data Structure ?
Antworten
-
ArrayList
-
Breadth First Search
-
Set
-
Priority Queue
-
Graph
Frage 10
Frage
Redefinition of method of superclass in a subclass with the same name and number of
parameters?
Antworten
-
Override
-
Overload
-
Public
-
Encapsulation
Frage 11
Frage
A set view of a map can be obtained through method_______?
Antworten
-
entrySet
-
setView
-
goAhead
-
emptySet
Frage 12
Frage
Which of them is NOT feature of collection interface ?
Antworten
-
Graph
-
List
-
Queue
-
Vector
-
Set
Frage 13
Frage
Redefinition of method with the same name but different number of parameters?
Antworten
-
Overload
-
Override
-
Encapsulation
-
Polymorphism
Frage 14
Frage
If you want to call the constructor of superclass you would use
Frage 15
Frage
Quadratic probing is usually used to ?
Antworten
-
reduce collisions
-
reallocate array
-
for fun
-
enlarge table size
Frage 16
Frage
This returns TRUE if the collection contains object
Antworten
-
Find(obj)
-
goTo(obj)
-
indexF(obj)
-
contains(obj)
-
indexOf(obj)
Frage 17
Frage
If you want to call different constructor of current class you would use
Antworten
-
this()
-
that()
-
anay()
-
which()
Frage 18
Frage
Elements of a List are accessed by means of an
Antworten
-
index
-
position
-
book
-
loop
-
switch
Frage 19
Frage
Set of ordered pairs whose element are known as the key and value is ?
Frage 20
Frage
If there is at least one abstract method in a class, that class is called
Antworten
-
Abstract class
-
Child class
-
Parent class
-
Not given
Frage 21
Frage
If there are no abstract methods in the class we call that class…
Antworten
-
Actual class
-
Abstract class
-
Parent
-
Superclass
Frage 22
Frage
A list can ___ or ___ as items(elements) are added or removed
Antworten
-
flow, shrink
-
grow, shrink
-
decrease, think
-
fly, sit
-
increase, grow
Frage 23
Frage
Is it possible to inherit from multiple classes ?
Frage 24
Frage
Is it possible to implement multiple interfaces?
Frage 25
Frage
The Collection is a _____ of a List ?
Antworten
-
superinterface
-
father
-
node
-
parent
-
interface
Frage 26
Frage
Every class has _____as a superclass
Frage 27
Frage
Which method returns an object at the top of a Stack in JAVA?
Antworten
-
top()
-
pop()
-
front()
-
peek()
-
poll()
Frage 28
Frage
InstanceOf used to test
Frage 29
Frage
Which method adds an item on the top of a Stack in JAVA?
Antworten
-
add()
-
top()
-
peek()
-
push()
-
bush()
Frage 30
Frage
Two JAVA API Implementation of Set and Map are
Antworten
-
tree and hash
-
graph and vector
-
list and hash
-
tree and list
Frage 31
Frage
What is not perfect in this code: ave = sum/count;
Frage 32
Frage
First in last out structure is...
Antworten
-
Tree
-
Graph
-
Set
-
Queue
-
Stack
Frage 33
Frage
Attempt to convert a string that is not numeric to a number faults …
Frage 34
Frage
Which structure is widely used in finding palindrome problem?
Antworten
-
Map
-
Stack
-
Graph
-
Queue
-
Set
Frage 35
Frage
Average time complexity of Insertion sort is?
Antworten
-
O(n^2)
-
O(1)
-
O(nlogn)
-
O(logn)
-
O(n)
Frage 36
Frage
Attempt to access array element using index less than zero folds
Frage 37
Frage
Which container is not appropriate to implement Stack in JAVA?
Frage 38
Frage
________ exception is an error normally due to programmer
Antworten
-
unchecked
-
checked
-
not given
-
null
Frage 39
Frage
Which structure is widely used to calculate the value of postfix expression?
Antworten
-
String
-
Array
-
Set
-
Stack
-
Queue
Frage 40
Frage
A hash table uses hashing to transform an items key into a table index so that iterations,
retrievals and deletions can be performed in expected ___________ time.
Antworten
-
O(1)
-
O(n)
-
O(n^2)
-
O(nlogn)
-
O(logn)
Frage 41
Frage
________ exception is an error normally not due to programmer
Antworten
-
unchecked
-
checked
-
null
-
not given
Frage 42
Frage
Calculate value of "4 7 * 20 - "
Frage 43
Frage
ADT that enables a user to access information (data) corresponding to a specified key.
Frage 44
Frage
Ability of object of one class to act like it is an object of another class is?
Frage 45
Frage
What does method empty return for empty stack?
Antworten
-
nothing
-
empty
-
hello
-
true
-
false
Frage 46
Frage
Which of the following is not example of visibility in Java ?
Antworten
-
Eclipse
-
JetBrains
-
NetBeans
Frage 47
Frage
Waiting line of people is similar to which data structure?
Antworten
-
Graph
-
Stack
-
Queue
-
Tree
-
LinkedList
Frage 48
Frage
Sets the element on position Index to reference entry
Antworten
-
Set (Index, Entry )
-
GEt(Index, Entry)
-
Nothing
-
Set(Entry)
Frage 49
Frage
Average time complexity of Merge sort is?
Antworten
-
O(nlogn)
-
O(1)
-
O(logn)
-
O(n)
-
O(n^2)
Frage 50
Frage
You can reference an object of a ___ type through a variable of a ___ type
Antworten
-
subclass, superclass
-
superclass, subclass
-
subclass, parent class
-
interface, subclass
Frage 51
Frage
Most sorting algorithm are divided into two basic groups.
Antworten
-
fast and slow
-
go amd play
-
sort and search
-
ordered and unordered
Frage 52
Frage
What is the time complexity of insert(index) method in ArrayList
Frage 53
Frage
You cast an object referenced by a___ type to an object of a___ type in order to apply methods of the___type to the object –___ :
Antworten
-
subclass, superclass, subclass, downcast
-
superclass, subclass, subclass, downcast
-
subclass, subclass, superclass, downcast
-
subclass, subclass, downcast, superclass
Frage 54
Frage
Which structure is better to use when printing many documents from multiple computers at one printer?
Antworten
-
Set
-
Queue
-
Graph
-
Stack
-
Tree
Frage 55
Frage
What is the difference between ArrayList and Vector?
Antworten
-
Vector is synchronized, where ArrayList is not
-
there are same
-
ArrayLIst is synchronized, where Vectoris not
Frage 56
Frage
JAVA API uses ____________ to implement both Set and Map interfaces.
Antworten
-
hash table
-
tree table
-
vector
-
graph
-
ArrayList
Frage 57
Frage
If we call remove() function for the queue, which item will be removed
Antworten
-
third
-
second
-
middle
-
first
-
last
Frage 58
Frage
Each node is a single-linked list, has a reference to__ and __
Antworten
-
next node, previous node
-
next node, data
-
data, next node
-
implement, next node
Frage 59
Frage
For(int i=0; i<size; i++){
If(theData[i]==entry){
Return i;
}Return -1;}
This method is similar to which method of ArrayList
Antworten
-
IndexOf(entry)
-
number
-
IndexOf(cell)
-
not given
Frage 60
Frage
What function return first added item in the queue?
Antworten
-
giveMeFirst()
-
front()
-
first()
-
goBack()
-
element()
Frage 61
Frage
Indicate constant time complexity in terms of Big-O notation
Frage 62
Frage
This method associates specified value with the specified key in the map.
Antworten
-
put(key,value)
-
set(key,value)
-
get(key,value)
-
key.set(key,value)
Frage 63
Frage
Which function is used to add new item in the queue?
Antworten
-
add()
-
suffer()
-
remove()
-
offer()
-
poll()
Frage 64
Frage
The collection of abstract methods is called
Antworten
-
Interface
-
Polymorphism
-
Super()
-
Tree
Frage 65
Frage
Indicate logarithm time complexity in terms of big-O notation?
Antworten
-
log(n)
-
log(1)
-
log(n^2)
-
log(n^3)
Frage 66
Frage
Average time complexity of Shell sort is?
Antworten
-
O(n^1.25)
-
O(n)
-
O(n^2)
-
O(nlogn)
-
O(1)
Frage 67
Frage
Indicate linear time complexity in terms of big-O notation?
Frage 68
Frage
Indicate exponential time complexity in terms of big-O notation?
Frage 69
Frage
What determines whether you should use quadratic sort or a logarithmic sort algorithm?
Antworten
-
array size
-
array indexes
-
array type
-
array values
-
swapping conditions
Frage 70
Frage
Find the slowest time
Antworten
-
O(n!)
-
O(1)
-
O(logn)
-
O(n^2)
Frage 71
Frage
What is the time complexity of ArrayList remove(index) method
Frage 72
Frage
In a double-linked list, each node has a reference to: ___, ___and ___
Antworten
-
next node, previous node, data
-
implement, data, next node
-
next node, data, previous node
-
data, next node previous node
Frage 73
Frage
In open addressing you can not remove an item to be deleted, so what should you do
instead?
Frage 74
Frage
What is the time complexity of adding an item in front of a LinkedList
Frage 75
Frage
Average time complexity of Bubble sort is?
Antworten
-
O(n^2)
-
O(nlogn)
-
O(1)
-
O(n)
-
O(logn)
Frage 76
Frage
What is the time complexity of insert(index) method in ArrayList?
Antworten
-
O(n^2)
-
O(n)
-
O(1)
-
O(mxn)
-
O(logn)
Frage 77
Frage
To remove an item from a single -linked list, you need a reference to
Antworten
-
previous node
-
next node
-
data
-
the node
Frage 78
Frage
What is the time complexity of adding element in the beginning of ArrayList
Frage 79
Frage
If two or more keys will be encoded to the same index of a hashtable, it is called.
Antworten
-
collision
-
error
-
mistake
-
duplicate
Frage 80
Frage
Which method removes an item on the top of a Stack in JAVA?
Antworten
-
peek()
-
pop()
-
hop()
-
remove()
-
drop()
Frage 81
Frage
To remove an item from a double -linked list, you need a reference to
Antworten
-
data
-
node
-
next
-
previous node
Frage 82
Frage
Which method searches for target and returns its position in LinkedList
Frage 83
Antworten
-
powerful code reuse mechanism
-
providing access to data
-
ability of object of one class to act like it is an object of another class
-
hiding an access to data
-
powerful technique to store all data together
Frage 84
Frage
Hiding access to data members of a class is called:
Antworten
-
Polymorphism
-
Encapsulation
-
Inheritence
-
None of them
Frage 85
Frage
An iterator allows us to access items of a list
Antworten
-
sequentially
-
ordinal
-
together
-
don't know
Frage 86
Frage
The relationship when one class is a subclass of another is called:
Frage 87
Frage
How to remove item from LinkedList
Antworten
-
Change Link of previous item to next item of item to be removed
-
Change Item
-
Change Link of next item to previous item to be changed
-
Change Link of next item to previous item of item to be removed
Frage 88
Frage
___testing focuses on testing the functional characteristics of a module
Antworten
-
Green-box
-
Terminal
-
White-box
-
Black-box
Frage 89
Frage
Ideal data structure for a contact list is ?
Antworten
-
tree
-
map
-
graph
-
set
-
vector
Frage 90
Frage
___testing requires the use of test data that exercise each statement in a module
Antworten
-
White-box
-
Black-box
-
Terminal
-
Green-box
Frage 91
Frage
What is attribute of CircularList
Frage 92
Frage
You apply method ____________ to set view to get an object that facilitates sequential
access to the Map elements.
Antworten
-
iterator
-
accessor
-
traversal
-
preorder
Frage 93
Frage
What is popularity used to traverse SingleLinkedList
Antworten
-
Interface
-
Iterator
-
Traversator
-
Loop and switch
-
Commutator
Frage 94
Frage
Which of the following in Java is very similar to “contract”?
Frage 95
Frage
The java linked-list class uses a ___ to implement the list interface
Antworten
-
array-linked list
-
array list
-
linked list
-
double-linked list
Frage 96
Frage
List iterator and iterator is the same thing in JAVA
Frage 97
Frage
Is it possible to traverse containing of a list this way? for(int nextInt : aList){… }
Frage 98
Frage
Show the method which exists in a DoubleLinkedList and not exist in a SingleLinkedList
Antworten
-
Previous()
-
Last()
-
Next()
-
This()
Frage 99
Frage
Can we access the element of a set by index?
Frage 100
Frage
What relationship class Node and LinkedList have?
Frage 101
Frage
A listIterator allows us to access the elements
Frage 102
Frage
Which of them is NOT an example of Data Structure ?
Antworten
-
Breadth First Search
-
Search
-
Search1
Frage 103
Frage
A queue is a ___-in ___-out data structure
Antworten
-
first, first
-
first, last
-
last, first
-
last, last
Frage 104
Frage
Operating system use ___ to determine which print job should be handled next
Frage 105
Frage
Two JAVA API implementation of Set and Map are:
Antworten
-
tree anf hash
-
tree and list
-
vector
-
arrayList
Frage 106
Frage
int xxx(int x){
if(n==1)return 1;
return x*xxx(x-1);
}
Frage 107
Frage
.Data structure similar to tree but it doesn't have limitation according to number of parents
is?
Frage 108
Frage
int xxx(int x, int y, int z){
if(z==1){return 1;}
return xxx(x+y,x,z-1);
}
Antworten
-
fibonacci
-
n!
-
trash in function
-
logn
Frage 109
Frage
Explain how interface is like a contract
Antworten
-
Class implementing interface must define none of it’s methods
-
Class implementing interface must define all it’s methods
-
Class implementing interface must define only one of it’s methods
-
Class implementing interface must define some of it’s methods
Frage 110
Frage
Node of a graph is called?
Frage 111
Frage
What is the time complexity of recursive Binary Search algorithm?
Frage 112
Frage
Recursive implementation works faster than lopped one
Frage 113
Frage
It's possible to implement all recursive algorithms without
Frage 114
Frage
Recursive solutions are more beautiful and easy to understands
Frage 115
Frage
Set of connections between vertices of a graph is called?
Frage 116
Frage
What are two important differences between abstract class and actual class? What are the
similarities?
Antworten
-
Abstract class should have abstract methods. It can’t be instantiated. They both may have
actual datafields and methods
-
Actual class should have abstract methods. It can’t be instantiated. They both may have
actual datafields and methods
-
Abstract class should have actual methods. It can be instantiated. They both may have
actual datafields and methods
-
Actual class should have actual methods. It can be instantiated. They both have not
abstract datafields and methods
-
Abstract class should have not abstract methods. It can be instantiated. They both may have actual datafields and methods
Frage 117
Frage
Quicksort is implemented recursively
Frage 118
Frage
List four subclasses of RuntimeException: IndexOutOfBounds, Arithmetic, IlegalArgument,
Antworten
-
OutputMismatch
-
InputMismatch
-
Logarithmic
-
LegalArgument
-
IllegalMismatch
Frage 119
Frage
What the time complexity of LinearSearch algorithm?
Antworten
-
O(n)
-
O(1)
-
O(logn)
-
O(nlogn)
Frage 120
Frage
Graph where each edge has a direction is called?
Antworten
-
directed
-
symmetric
-
unconnected
Frage 121
Frage
How protected visibility can be equivalent to public?
Antworten
-
If two related classes are in the different package.
-
If two related classes are in the same package.
-
If one related class is in the same package.
-
If two related methods are in the same package.
-
If two related methods are in the different package.
Frage 122
Frage
for(i<n)
if(a[i] == item)
return i;
This algorithm is similar to ...
Antworten
-
Linear Search
-
Binary Search
-
Huffman tree
-
Full binary search
Frage 123
Frage
Adjacent matrix representing undirected graph should be?
Antworten
-
symmetric
-
assymmetric
-
connected
Frage 124
Frage
Explain why Shape can not be an actual class
Antworten
-
Because it has abstract methods
-
Because it has actual methods
-
Because it has not abstract methods
-
Because it has not actual methods
Frage 125
Frage
To use Binary Search items should be ...
Antworten
-
ordered
-
traversed
-
matched
-
divorced
Frage 126
Frage
Vertex is ________ to another vertex if there is an edge connecting them
Antworten
-
adjacent
-
subling
-
brotherhood
-
BFS
Frage 127
Antworten
-
the different method realized differently in a child class.
-
the same method realized differently in a child class.
-
the same method realized samely in a child class.
-
the same method not realized differently in a child class.
-
the same method realized differently in a parent class.
Frage 128
Frage
.A __________ is a sequence of vertices in which each successive vertex is connected to its
predecessor. (Graphs)
Frage 129
Antworten
-
the same method realized differently in a child class.
-
when number of parameters changed then it will be another method.
-
the same method realized differently in a parent class.
-
when single of parameter changed then it will be another method.
-
when number of parameters changed then it still will be same method.
Frage 130
Frage
A ___________ path is a simple path in which only the first and last items are the same.
Frage 131
Frage
The node of a tree without children is called ...?
Frage 132
Frage
Describe the use of the keywords super. and super(...)?
Antworten
-
If you want to call some method of parent class then use super.
-
If you want to call some method of child class then use super.
-
If you want to call some method of parent class then use normal.
-
If you want to call some method of child class then use normal.
-
If you want to call some method of parent class then do not use super.
Frage 133
Frage
.If there is no path path from vertex to any other vertex that graph is considered to be ?
Frage 134
Frage
A _______ of a node is a tree whose root is a child of that node
Antworten
-
parent
-
subtree
-
leaf
-
root
-
child
Frage 135
Frage
What can you say about class Object?
Antworten
-
Object is child of all classes in JAVA.
-
Object is parent of one class in JAVA.
-
Object is child of one class in JAVA.
-
Object is parent of all classes in JAVA.
-
Object is parent of some class in JAVA.
Frage 136
Frage
Indicate two ways of graph implementations
Antworten
-
list and matrix
-
hash and list
-
ArrauList and vector
-
Tree and map
Frage 137
Frage
.A __________ graph is one in which [E] is close to but less than [V]^2.
Frage 138
Frage
Describe the difference between is - a and has - a relationships?
Antworten
-
Has - a – parent child relationship Is - a – when one class has another inside itself.
-
Has - a – parent child relationship Is - a – when all classes have another inside itself.
-
Is - a – parent child relationship Has - a – when one class has another inside itself.
-
Is - a – parent child relationship Has - a – when all classes have another inside itself.
Frage 139
Frage
A ________ graph is one where [E] is much less than [V]^2.
Antworten
-
sparse
-
dense
-
i don`t know
-
go home and cry
Frage 140
Frage
What is the advantage of specifying an abstract data type as an interface instead of just going ahead and implementing it as a class?
Antworten
-
Any class can implement many interface and can not extend more than one class
-
All classes can implement only one interface and can not extend more than one class
-
All classes can implement only one interface and can extend more than one class
-
Any class can implement many interface and can extend more than one class
-
All class can implement many interface and can extend more than one class
Frage 141
Frage
Which of the graph implementation is more efficient in terms of memory usage?
Frage 142
Frage
The ______ of a node is a measure of its distance from the root
Antworten
-
level
-
distance
-
parent
-
root
-
sibling
Frage 143
Frage
Which of the graph implementations is more simple?
Frage 144
Frage
What are two different uses of a term interface in programming
Antworten
-
Interface is a java keyword. Relationship between user and computer (HCI).
-
Interface is not a java keyword. Relationship between user and computer (HCI).
-
Interface is a java keyword. Relationship between programm and computer (HCI).
-
Interface is a not java keyword. Relationship between user and programm (HCI).
-
Interface is a java keyword. Relationship with user and computer (HCI).
Frage 145
Frage
Why do we need BFS and DFS algorithms?
Antworten
-
to have fun
-
to traverse a graph
-
be aware of collision
Frage 146
Frage
Distance from the root to its deepest leaf is knows as ______ of a tree?
Antworten
-
height
-
root
-
path
-
subtree
-
depth
Frage 147
Frage
What do abstract methods and interfaces have in common? How do they differ?
Antworten
-
In interface methods are defined. But in abstract classes the abstract methods can be defined to show its default behaviour.
-
In interface methods are not defined. But in actual classes the abstract methods can be defined to show its default behaviour.
-
In interface methods are not defined. But in abstract classes the abstract methods can be defined to show its default behaviour.
-
In interface methods are defined. But in abstract classes the actual methods can be defined to show its default behaviour.
-
In interface methods are defined. But in abstract classes the abstract methods cannot be defined to show its default behaviour.
Frage 148
Frage
Traversing graph visiting a start node first, then all nodes that are adjacent to it next.
Frage 149
Frage
List two subclasses of IOException:
Antworten
-
EOFException, FileFoundException
-
EOFException, FileNotFoundException
-
SQLException, FileNotFoundException
-
EOFException, SQLException
Frage 150
Frage
Traversing graph visiting a start node first, then choose one node that is adjacent to it next.
Frage 151
Frage
Dijkstra's algorithm use ______ algorithm to traverse all nodes.
Frage 152
Frage
Explain why Shape can not be an interface
Antworten
-
Because it has not actual methods
-
Because it has actual methods
-
Because it has abstract methods
-
Because it has not abstract methods
-
Because it has actual and abstract methods
Frage 153
Frage
Graph is considered to be ___________ if there is a path from each vertex to any other
vertex.
Frage 154
Frage
.In ___________ graph is {v, u} is edge then {u, v} is not necessary an edge
Frage 155
Frage
Tree where every item must have at most 2 children is called?
Antworten
-
Binary Tree
-
Unary Tree
-
Huffman Tree
-
General Tree
Frage 156
Frage
Structured set of data is called _______.
Frage 157
Frage
What does encapsulation mean, and how it is used in JAVA?
Antworten
-
Encapsulation – unlimiting access to datafields.
-
Encapsulation is one of the OOPs feature that allows us to perform a single action in different ways.
-
Encapsulation is one of the OOPs feature that is not allows us to perform a single action in different ways.
-
Encapsulation – limiting access to datafields.
Frage 158
Frage
An ordered set of instructions is called.
Frage 159
Frage
What is the benefit of encoding letters trough Huffman tree
Antworten
-
earning space
-
it is smart
-
just for fun
-
more beautiful
-
it is simple
Frage 160
Frage
Describe the use of the keywords this. and this (...)?
Antworten
-
This() – used to get datafields of current class This. – used to call the constructor
of current class.
-
This. – used to get datafields of current class This() – used to call the constructor
of current class.
-
This. – used to call the constructor of current class This() – used to get datafields of current class
-
This. – used to get datafields of all classes This() – used to call the constructor
of current class.
-
This. – used to get datafields of all classes This() – used to call the constructor
of all classes.
Frage 161
Frage
Explain the relationship between classes Number, Integer and Short.
Antworten
-
Number is child of Integer and Short.
-
Integer is parent of Number and Short.
-
Number is parent of Integer and Short.
-
Short is parent of Number and Integer.
-
Integer is child of Number and Short.
Frage 162
Frage
A tree where left child is less and right child is more than its parent called?
Antworten
-
Binary
-
Huffman Tree
-
DFS
-
Breadth first search
Frage 163
Frage
Search a binary search tree costs?
Antworten
-
O(logn)
-
O(nlogn)
-
O(1)
-
O(n)
Frage 164
Frage
The four kinds of visibility in order of decreasing visibility are:
Antworten
-
Public, package, protected, private
-
Private, protected, package, public
-
Package, private, public, protected
-
Protected, package, private, public
-
Private, public, protected, package
Frage 165
Frage
What is default package visibility?
Antworten
-
Classes in the different package are visible to each other without import.
-
Classes in the same package are visible to each other without import.
-
Classes in the same package are not visible to each other without import.
-
Classes in the different package are not visible to each other without import.
-
Classes in the same package are invisible to each other without import.
Frage 166
Frage
Form of method determined by its name and arguments
Antworten
-
Java method
-
Signature method
-
Get method
-
Data method
-
Set method
Frage 167
Frage
A tree where all nodes should have 2 children and leaves have no children is called?
Antworten
-
full binary tree
-
general tree
-
unary tree
-
perfect tree
-
binary tree
Frage 168
Frage
An____ specifies the requirements of an ADT as a contract between the____ and ____; A ____ implements the ADT
Antworten
-
interface, user, developer, method
-
implemetation, developer, user, class
-
interface, developer, user,class
-
implemetation, user, developer, class
-
implemetation, developer, user, method
Frage 169
Frage
Visit root node, traverses left subtree, traverse right subtree traversal is called?
Antworten
-
inorder
-
preorder
-
postorder
Frage 170
Frage
An interface can be implemented by multiple classes -
Frage 171
Frage
Traverse left subtree, Visit root node, traverse right subtree traversal is called?
Antworten
-
preorder
-
inorder
-
postorder
Frage 172
Frage
traverse left subtree visit root node traversal is called?
Antworten
-
inorder
-
postorder
-
preorder
Frage 173
Frage
This method of a binary tree class return true if tree is a leaf and false otherwise?
Antworten
-
isLeaf()
-
isEmpty()
-
noMore()
-
isLast()
-
goHome()
Frage 174
Frage
Element insertion to a Binary Search tree costs?
Antworten
-
O(logn)
-
O(1)
-
O(n)
-
O(nlogn)
Frage 175
Frage
Does binary search tree contain duplicates?
Frage 176
Frage
Complete binary tree where all children must be smaller than parents is?
Antworten
-
maxheap
-
minheap
-
hiphop
-
treeheap
Frage 177
Frage
Complete binary tree where all children must be bigger than parents is?
Antworten
-
minheap
-
maxheap
-
hiphop
-
fullheap
-
treeheap
Frage 178
Frage
Insert and remove items from a heap costs?
Antworten
-
O(1)
-
O(n)
-
O(nlogn)
-
O(nxn)
Frage 179
Frage
The heap is used to implement the special kind of a queue called priority queue
Frage 180
Frage
A ________ tree is a binary tree used to store a code that facilitates the compression
Antworten
-
heap
-
Huffman
-
Dijkstra
-
DFS
-
DBS
Frage 181
Frage
Data structure based on BST where all items are sorted and unique is?
Antworten
-
graph
-
treeMap
-
treeSet
-
vector
-
tree
Frage 182
Frage
Recursive nonlinear data structure that is used to represent data organized in a hierarchy?
Antworten
-
tree
-
vector
-
graph
-
arrayList
-
linkedList
Frage 183
Frage
In a Huffman tree, the item with the lowest frequency of occurrence will have the _____ code.
Antworten
-
longest
-
easiest
-
shortest
-
binary
-
deepest
Frage 184
Frage
Which of the following is recursive algorithm?
Antworten
-
QuickSort
-
Insertionsort
-
Selectionsort
-
BUBBLESORT
Frage 185
Frage
Average time complexity of Selection sort is?
Antworten
-
O(n^2)
-
O(n^3)
-
O(n^2,25)
-
O(n)
Frage 186
Frage
Average time complexity of Heap sort is?
Antworten
-
O(logn)
-
O(nlogn)
-
O(n)
-
O(1)
Frage 187
Frage
Average time complexity of Quick sort is?
Antworten
-
O(nlogn)
-
O(logn)
-
O(n)
-
O(1)