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