Question 1
Question
Inheritance is ...
Answer

Powerful code reuse mechanism

providing access to data

ability of object of one class to act like it is object of another class

hiding an access to data

powerful technique to store all data together
Question 2
Question
Qucksort is implemented recursively
Question 3
Question
Waiting line of people is similar to which data structure?
Answer

Queue

LinkedList

Stack

Tree

Graph
Question 4
Question
Which of the graph implementations is more simple?
Question 5
Question
To use Binary Search items should be ...
Answer

ordereed

matched

divorced

traversed

beaten
Question 6
Question
Reference "rear" of CircularArray is usually indicates ...
Answer

last added item

first added item

secondly added item

middle of array

top of a stack
Question 7
Question
If there is no path path from vertex to any other vertex that graph is considered to be ?
Answer

unconnected

undirected

DFS

BFS

weighted
Question 8
Question
Can we implement the queue using LinkedList?
Question 9
Question
What is not perfect in this code: ave = sum / count;
Answer

division by zero may occur

multiplication by 10000000 is impossible in JAVA

ave should be written as average

semicolon needed after =

it is not java code
Question 10
Question
Returns the reference to the element at position index
Answer

get(index)

has(index)

goTo(index)

fly(index)

set(index)
Question 11
Question
Indicate exponential time complexity in terms of bigO notation?
Answer

O(2^n)

O(logn)

O(n^4)

O(nlogn)

O(n)
Question 12
Question
Traversing graph visiting a start node first, then all nodes that are adjacent to it next.
Answer

BFS

DFS

DIjkstra

matrix

preorder
Question 13
Question
A ________ graph is one where [E] is much less than [V]^2.
Answer

sprase

dense

path

hence

directed
Question 14
Question
Which method returns an object at the top of a Stack in JAVA?
Answer

peek()

front()

top()

pop()

poll()
Question 15
Question
The ____________ algorithm finds minimum spanning tree for a graph.
Answer

prim

DFS

matrix

Dijkstra

BFS
Question 16
Question
traverese left subtree, Visit root node, traverse right subtree traversal is called?
Answer

inorder

postorder

preorder
Question 17
Question
Data structure based on BST where all items are sorted and unique is?
Answer

treeSet

tree

treeMap

vector

graph
Question 18
Question
Graph is considered to be ___________ if there is a path from each vertex to any other vertex.
Answer

connected

weighted

directed

unweighted

unconnected
Question 19
Question
What is the difference between ArrayList and Vector?
Answer

Vector is synchronized where ArrayList is not

There is no difference

vector is resizable where ArrayList is not

vector is flexible where ArrayList is not

vector is scalable where ArrayList is not
Question 20
Question
Visit root node, traverese left subtree, traverse right subtree traversal is called?
Answer

preorder

inorder

postorder
Question 21
Question
First in last out structure is ...
Question 22
Question
Which container is not appropriate to implement Stack in Java?
Question 23
Question
Average time complexity of Bubble sort is?
Answer

O(n^2)

O(nlogn)

O(logn)

O(1)

O(n^3)
Question 24
Question
Every class has __________ as a superclass.
Answer

object

main

string

java

subject
Question 25
Question
traverse left subtree, traverse right subtree, visit root node traversal is called ?
Answer

postorder

preorder

inorder
Question 26
Question
A ___________ tree is a binary tree used to store a code that facilitates file compression.
Answer

Huffman

BFS

DFS

Dijkstra

heap
Question 27
Question
Distance from the root to its deepest leaf is known as __________ of a tree?
Answer

depth

height

path

subtree

root
Question 28
Question
The node of a tree without children is called ... ?
Answer

leaf

sibling

root

tree

subtree
Question 29
Question
Which structure is better to use when printing many documents from multiple computers at one printer?
Answer

queue

set

tree

stack

graph
Question 30
Question
A collision occurs when ... ?
Answer

two keys hash to the same table index.

i don't know what it is

impossible to answer

two keys are hashed to a very big table index and rehash needed

two values hash to the same table index
Question 31
Question
A __________ graph is one in which [E] is close to but less than [V]^2.
Answer

dense

sprase

directed

dark

hence
Question 32
Question
Average time complexity of Merge sort is?
Answer

O(nlogn)

O(n^2)

O(n^3)

O(n)

O(logn)
Question 33
Question
The _________ is used to implement the special kind of a queue called priority queue.
Question 34
Question
Average time complexity of Shell sort is?
Answer

O(n^1.25)

O(1)

O(n)

O(logn)

O(n^2)
Question 35
Question
If there is at least one abstract method in a class, that class is called ...
Answer

abstract class

vanish class

tired class

recursive class

general class
Question 36
Question
Finding the shortest path algorithm is called?
Answer

Dijkstra

DFS

BFS

Binary Search
Question 37
Question
Which part is accessible to user?
Answer

public

private

protected

interacted

social
Question 38
Question
Dijkstra's algorithm use ______ algorithm to traverse all nodes.
Answer

BFS

DFS

matrix

tree

Prime's
Question 39
Question
A list can _________ or _________ as elements added or removed.
Answer

grow, shrink

increase, grow

fly, sit

decrease, think

flow, shrink
Question 40
Question
What is the time complexity of recursive Binary Search algorithm?
Answer

O(logn)

O(NxM)

O(nlogn)

O(n)
Question 41
Question
Why do we need BFS and DFS algorithms?
Question 42
Question
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.
Answer

quick

heap

merge

selection

bubble
Question 43
Question
Show the method which exists in DoubleLinkedList and not exist in SingleLinkedList?
Answer

previous()

next()

constructor

hasBefore()

hasNext()
Question 44
Question
What determines whether you should use quadratic sort or a logarithmic sort algorithm?
Answer

array size

array values

swapping conditions

array type

array index
Question 45
Question
The Collection is a _________ of a List
Answer

superinterface

node

interface

parent

father
Question 46
Question
The _________ level of a node is a measure of its distance from the root.
Answer

level

distance

parent

father
Question 47
Question
A queue _________ in ___________ out data structure.
Answer

first, first

set,get

last,last

first,last

last,first
Question 48
Question
for(int i=0; i< size; i++){
if(theData[i]==entry){
return i;
}
return 1;
}
This method is similar to which method of ArrayList?
Answer

indexOf(entry)

get(entry)

equals(entry)

set(entry)
Question 49
Question
______________ exception is an error normally not due to programmer.
Answer

checked

unchecked

cracked

hacked
Question 50
Question
______________ exception is an error normally due to programmer.
Answer

unchecked

checked

hacked

cracked
Question 51
Question
Distance from the deepest leaf to the root of a tree is called?
Answer

height

depth

leaf

tree

breadth
Question 52
Question
ListIterator and Iterator is the same thing in JAVA.
Question 53
Question
The function that calls itself is called ...
Answer

recursive function

functional function

defensive function

impressive function
Question 54
Question
If you want to call different constructor of current class you would use ...
Answer

this()

this.

super.

super()
Question 55
Question
Which method adds an item on the top of the Stack in JAVA?
Answer

push()

peek()

top()

add()
Question 56
Question
In open addressing you can not remove an item to be deleted, so what should you do instead?
Question 57
Question
What is the best time complexity of recursively finding fibbonachi nuber?
Answer

O(n)

H2O

O(n^2)

O(logn)

O(1)
Question 58
Question
A __________ is a sequence of vertices in which each successive vertex is connected to its predecessor. (Graphs)
Answer

path

graph

route

cycle

weight
Question 59
Question
Searching a binary search tree costs?
Question 60
Question
Average time complexity of Selection sort is?
Answer

O(n^2)

O(nlogn)

O(logn)

O(n)
Question 61
Question
Full name of this course is ?
Question 62
Question
In ___________ graph is {v, u} is edge then {u, v} is not necessary an edge.
Answer

directed

undirected

weighted

connected
Question 63
Question
Average time complexity of Quick sort is?
Answer

O(nlogn)

O(logn)

O(n)

O(1)
Question 64
Question
Ideal data structure for a contact list is ?
Answer

map

vector

graph

tree

set
Question 65
Question
Each recursive function has two cases ________ and _________.
Answer

base, recursive

continued, stopped

looped, switched

lelik, bolik

base,defensive
Question 66
Question
Array reallocation cost is ______?
Answer

O(n)

O(1)

O(logn)

O(nlogn)

O(n^2)
Question 67
Question
It is possible to implement all recursive algorithms without recursion
Question 68
Question
Set of connections between vertices of a graph is called?
Answer

edge

vertex

roof

path

cycle path
Question 69
Question
Hiding access to data members of a class is called ...
Answer

Encapsulation

Overloading

Overriding

Inheritance

Polymorphism
Question 70
Question
Using a hash table enables us to retrive an item in a __________ time.
Answer

constant

linear

average

nlogn

logarithmic
Question 71
Question
Is it possible to implement multiple interfaces?
Question 72
Question
Sets the element on position index to reference entry
Answer

set(index, entry)

entry.set(index)

index.set(entry)

setTo(index, entry)

set.index(entry)
Question 73
Question
Which of the graph implementation is more efficient in terms of memory usage?
Question 74
Question
In the queue implemented as a LinkedList, poll() function should ...
Answer

remove first added item

remove last added item

play with items

remove middle item

add new item
Question 75
Question
Which function is used to add new item in the queue?
Answer

offer()

poll()

add()

suffer()

remove()
Question 76
Question
Recursive solutions are more beautiful and easy to understand.
Question 77
Question
Which structure is widely used to calculate the value of postfix expression?
Answer

Stack

Array

Set

String

Queue
Question 78
Question
This returns true if the collection contains obj.
Answer

contains(obj)

goTO(obj)

indexF(obj)

find(obj)

indexOf(obj)
Question 79
Question
Redefinition of the method of superclass in a subclass with the same name and number of parameters is...
Answer

override

overload

overbeat

overhead

upperload
Question 80
Question
If you want to call the constructor of superclass you would use ...
Answer

super()

this()

this.

super.

constructor()
Question 81
Question
Element insertion to a Binary Search tree costs?
Answer

O(logn)

O(1)

O(n)

O(n^2)

O(f(n))
Question 82
Question
Distance from the deepest leaf to the root of a tree is called?
Answer

height

breadth

leaf

tree

depth
Question 83
Question
What is the time complexity of adding an item in front of a LinkedList?
Answer

O(1)

O(n)

O(n^2)

O(n^3)

O(nlogn)
Question 84
Question
The collection of abstract methods is called?
Answer

interface

function

abstract class

class

method
Question 85
Question
This method returns a string that textually represents an object.
Answer

toString()

toGo()

toText()

equals()

hashCode()
Question 86
Question
Graph where each edge has a direction is called?
Answer

directed

wayed

mapped

strong

stricted
Question 87
Question
Which of the following is not example of visibility in JAVA.
Answer

Eclipsed

Public

Private

Protected

Package
Question 88
Question
A tree where left child is less and right child is more than its parent called?
Answer

Binary Search Tree

Binary tree

Huffman tree

Breadth first search

DFS
Question 89
Question
How to handle exceptions
Question 90
Question
Is it possible to inherit from multiple classes?
Question 91
Question
Vertex is ________ to another vertex if there is an edge connecting them.
Answer

adjacent

brotherhood

sibling

BFS

DIJkstra
Question 92
Question
If two or more keys will be encoded to the same index of a hashtable, it is called.
Answer

collision

duplicate

decision

error

mistake
Question 93
Question
Returns entry at the front of a Deque without removing it
Answer

peekFirst()

pollFirst()

popFirst()

takeFirst()

get(index)
Question 94
Question
Complete binary tree where all children must be bigger than parents is ?
Answer

minheap

maxheap

fullheap

hiphop

treeheap
Question 95
Question
Which function return first added item in the queue?
Answer

element ()

giveMeFirst

goBack()

first()

front()
Question 96
Question
Gets the size of the ArrayList
Answer

size()

sizeOf()

length(list)

size(list)

length
Question 97
Question
Traversing graph visiting a start node first, then choose one node that is adjacent to it next.
Answer

DFS

BFS

matrix

tree

DIjkstra
Question 98
Question
The relationship when one class is a subclass of another is called ...
Answer

isa

hasa

toc

isb

hasb
Question 99
Question
Recursive nonlinear data structure that is used to represent data organized in a hirarchy?
Answer

tree

vector

graph

arrayList

linkedList
Question 100
Question
Which of them is not an example of Data Structure
Answer

Breadth First Search

Graph

ArrayList

Set

Priority Queue
Question 101
Question
Two JAVA API implementation of Set and Map are:
Answer

tree and hash

graph and tree

list and hash

graph and vector

tree and list
Question 102
Question
Which of them is not a feature of Collection Interface?
Answer

graph

set

queue

vector

list
Question 103
Question
Indicate two ways of graph implementations
Answer

list and matrix

tree and hash

set and map

array and vector

queue and stack
Question 104
Question
Indicate logarithmic time complexity in terms of bigO notation?
Answer

O(logn)

O(1)

O(n)

O(2)

O(done)
Question 105
Question
What are the two parts of ADT?
Answer

Private and Public

ArrayList and Vector

Parent and Child

Int and Float

Queue and Stack
Question 106
Question
public xxx(int index){
return theData[index];
}
this behaviour is similar to which method of ArrayList class?
Answer

get

equals

set

size

goHome
Question 107
Question
Indicate the relationship of HashtableOpen and Entry classes?
Answer

hasa

isa

isb

static

public
Question 108
Question
Which method removes an item on the top of a Stack in JAVA?
Answer

pop()

peek()

hop()

drop()

remove()
Question 109
Question
How to remove item from LinkedList?
Answer

change link of prev item to next item of item to be removed

go home and cry

change link of next item to prev item of item to be removed

change link of removing item to prev

change link of remobingitem to next
Question 110
Question
Find the slowest time
Answer

O(n!)

O(n)

O(2^n)

O(100)

O(n^4)
Question 111
Question
Node of a graph is called?
Answer

vertex

edge

path

weight

dijkstra
Question 112
Question
calculate the value of "4 7 * 20 "
Question 113
Question
Complete binary tree where all children must be smaller than parents is ?
Answer

maxheap

minheap

fullheap

hiphop

treeheap
Question 114
Question
The relationship when one class is defined inside the definition of another is called...
Answer

hasa

isa

isb

hasb

toc
Question 115
Question
Prim's algorithm is used to calculate __________.
Question 116
Question
Which of them has more methods?
Question 117
Question
A ___________ of a node is a tree whose root is a child of that node.
Answer

subtree

leaf

root

child

parent
Question 118
Question
Structured set of data is called _______.
Answer

data structure

set of data

algorithm

data pattern

design of data
Question 119
Question
Circular Array is usually used to implement ...
Answer

queue

tree

stack

graph

shreck
Question 120
Question
int xxx(int x){
if(n==1) return 1;
return x*xxx(x1);
}
this function calculates
Answer

n!

fibbonachi

x^n

2^n

x/n
Question 121
Question
JAVA API uses ____________ to implement both Set and Map interfaces.
Answer

hash table

vector

tree table

arraylist

graph
Question 122
Question
Average time complexity of Insertion sort is?
Answer

O(n^2)

O(2^n)

O(1)

O(logn)

O(nlogn)
Question 123
Question
What is the time complexity of ArrayList remove(index) method?
Answer

O(n)

O(n^3)

O(1)

O(nlogn)

O(nxn)
Question 124
Question
Does binary search tree contain duplicates?
Answer

no

yes

i have to go

i don't know

maybe
Question 125
Question
for (i<n)
if (a[i] == item)
return i;
This algotithm is similar to ...
Answer

linear search

deep sort

heap sort

binary search

merge sort
Question 126
Question
Would an operating system use stack or queue to determine which print job should be handled next?
Answer

queue

tree

stack

set

graph
Question 127
Question
What is popularly used to traverse SingleLinkedList?
Answer

iterator

loop and switch

interface

commutator

traversator
Question 128
Question
Quadratic probing is usually used to ?
Answer

reduce collisions

enlarge table size

reallocate array

for fun

calculate x^2
Question 129
Question
To apply Dijkstra's algorithm graph should be.
Answer

weighted

directed

isomorphic

undirected

cyclic
Question 130
Question
Inventor of merge sort is ?
Answer

John von Neumann

John Lennon

Van der Sar

Mr Merge

Professor Sortmerg
Question 131
Question
instanceof used to test ...
Answer

whether an object belongs to class or not

weather object has parent or nor

weather is is the biggest object

weather object is object or not

weather objectplays football or not
Question 132
Question
Most sorting algorithm are divided into two basic groups.
Answer

fast and slow

sort and search

best and worst

go and play

ordered and unordered
Question 133
Question
Attempt to convert a string that is not numeric to a number faults ...
Question 134
Question
Average time complexity of Heap sort is?
Answer

O(nlogn)

O(n)

O(1)

H2O

O(n^2)
Question 135
Question
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.
Answer

O(1)

O(n)

O(n^2)

O(logn)

O(nlogn)
Question 136
Question
Data structure similar to tree but it doesn't have limitation according to number of parents is?
Answer

graph

tree

treeset

queue

dequeue
Question 137
Question
Set of ordered pairs whose element are known as the key and value is ?
Answer

map

set

graph

array

too easy for me
Question 138
Question
Ability of object of one class to act like it is an object of another class is?
Question 139
Question
A ________ is a special cas of a graph. A ________ is a connected graph that contain no cycles.
Answer

tree,tree

matrix,list

set,map

BFS,DFS

tree,hash
Question 140
Question
What relationship class Node and LinkedList have?
Answer

hasa

isa

toc

isb

hasb
Question 141
Question
Which of the following is recursive algorithm?
Question 142
Question
Can we access the element of a set by index?
Question 143
Question
List two ways of organizing hashtable.
Question 144
Question
This method of a binary tree class return true if tree is a leaf and false otherwise?
Answer

isLeaf()

isEmpty()

noMore()

isLast()

goHome()
Question 145
Question
ADT that enables a user to access information (data) corresponding to a specified key.
Question 146
Question
An ordered set of instructions is called.
Answer

algorithm

hello world

pseudocode

data structure

array
Question 147
Answer

Object oriented programming

Omar oriented programming

Object oriented playing

Obstacle oriented programming

OOP is the keyword of Java programming and stands for nothing
Question 148
Question
Is it possible to traverse contaning of a list this way?
for( int nextInt : aList ){ ... }
Answer

yes

no

maybe

i don't know
Question 149
Question
Which structure is widely used in finding palindrome problem?
Answer

stack

queue

graph

set

map
Question 150
Question
Adding an item to the beginning of CircularArray costs?
Answer

O(1)

O(logn)

O(n)

O(n^2)

7 iterations
Question 151
Question
What is the attribute of CircularList?
Answer

Next of last item referencing to the first item

Next of best item referencing to the worst item

Next of first item referencing to the last item

I need to go home and prepare for this

Prev of last item referencing to last item
Question 152
Question
Attempt to access array element using index less than 0 faults ...
Question 153
Question
What does method empty return for empty stack?
Answer

true

false

nothing

empty

hello
Question 154
Question
Elements of a List are accessed by means of an __________
Answer

index

position

loop

switch

book
Question 155
Question
If we call remove() function for the queue, which item will be removed?
Answer

first

second

middle

third

last
Question 156
Question
This method associates specified value with the specified key in the map.
Answer

put(key, value)

set(key, value)

get(key, value)

associate(key, value)

key.set(value)
Question 157
Question
Indicate linear time complexity in terms of bigO notation?
Answer

O(n)

O(loglogn)

O(logn)

O(n^2)

O(n^3)
Question 158
Question
A tree where all nodes should have 2 children and leaves have no children is called?
Answer

full binary tree

binary tree

unary tree

general tree
Question 159
Question
Insert and remove items from a heap costs?
Answer

O(logn)

O(nlogn)

O(n)

O(n^2)

O(1)
Question 160
Question
What is the time complexity of adding element in the beginning of ArrayList?
Answer

O(n)

O(nlogn)

O(logn)

O(n^2)

O(25)
Question 161
Question
Adjacent matrix representing undirected graph should be?
Answer

symmetric

triangular

linear

diagonal

orthognal
Question 162
Question
Which of the following in java is very similar to "contract"?
Answer

Interface implementation

Class overriding

Class inheritance

Dancing in a queue

Method overloading
Question 163
Question
Where new item added in the queue?
Question 164
Question
Which method searches for target and returns its position in LinkedList?
Answer

indexOf(target)

get(target)

set(target)

go(target)

equal(target)
Question 165
Question
A ___________ path is a simple path in which only the first and last items are the same.
Answer

cycle

tour

mapped

trip

looped
Question 166
Question
Graph where each edge has a direction is called?
Answer

directed

sticked

strong

wayed

mapped
Question 167
Question
Redefinition of method with the same name but different number of parameters is called...
Answer

overload

override

inheritance

polymorphism

encapsulation
Question 168
Question
Recursive implementation works faster than lopped one.
Question 169
Question
If there are no abstract methods in the class we call that class ...
Answer

Actual Class

Abstract Class

Non abstract Class

Super Class

Funny Class
Question 170
Question
Which part is not accessible to user?
Answer

Private

Based

Controlled

Shifted

Public
Question 171
Question
What is the time complexity of insert(index) method in ArrayList
Answer

O(n)

O(logn)

O(1)

O(n^2)

O(100)
Question 172
Question
What is the feature of Deque?
Answer

cheap element addition and removal from the beginning

cheap element addition and removal from the end

cheap element addition and removal from the middle

removal

addition
Question 173
Question
The function that calls itself is called ...
Answer

recursive function

functional function

defensive function

overloaded function

impressive function
Question 174
Question
int xxx(int x, int y, int z){
if(z==1){return 1;}
return xxx(x+y, x, z1);
}
this function is
Answer

Fibbonachi

it is trash function

x^n

n!

2^n
Question 175
Question
What is the time complexity of Linear Search algorithm?
Answer

O(n)

O(nlogn)

O(1)

O(n^2)

O(logn)
Question 176
Question
The node of a tree without children is called ... ?
Answer

leaf

tree

siblin

root

subtree
Question 177
Question
Tree where every item must have at most 2 children is called?
Answer

Binary Tree

General Tree

Huffman Tree

Generic Tree

Unary Tree
Question 178
Question
What is the benefit of encoding letters trough Huffman tree.
Answer

earning space

more beautiful

just for fun

it is simple

it is smart
Question 179
Question
A set view of a map can be obtained through method_______?
Answer

entrySet

emptySet

setView

viewAsSet

goAhead
Question 180
Question
You apply method ____________ to set view to get an object that facilitates sequential access to the Map elements.
Answer

iterator

preorder

accessor

traversal

posorder
Question 181
Question
If you want to call data member of superclass you would use ...
Answer

super.

this.

this()

super()

method
Question 182
Question
In a Huffman tree, the item with the lowest frequency of occurrence will have the ___________ code.
Answer

shortest

deepest

longest

easiest

binary
Question 183
Question
A Stack is __________ in _________ out data structure.
Answer

last,first

first,first

back, top

end,end

front,front