Dina  Kim
Quiz by , created more than 1 year ago

Quiz on CS_DATA_STRUCT, created by Dina Kim on 26/03/2019.

115
4
0
No tags specified
Dina  Kim
Created by Dina Kim about 5 years ago
Close

CS_DATA_STRUCT

Question 1 of 183

1

Inheritance is ...

Select one of the following:

  • 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

Explanation

Question 2 of 183

1

Qucksort is implemented recursively

Select one of the following:

  • True
  • False

Explanation

Question 3 of 183

1

Waiting line of people is similar to which data structure?

Select one of the following:

  • Queue

  • LinkedList

  • Stack

  • Tree

  • Graph

Explanation

Question 4 of 183

1

Which of the graph implementations is more simple?

Select one of the following:

  • Matrix

  • map

  • set

  • list

Explanation

Question 5 of 183

1

To use Binary Search items should be ...

Select one of the following:

  • ordereed

  • matched

  • divorced

  • traversed

  • beaten

Explanation

Question 6 of 183

1

Reference "rear" of CircularArray is usually indicates ...

Select one of the following:

  • last added item

  • first added item

  • secondly added item

  • middle of array

  • top of a stack

Explanation

Question 7 of 183

1

If there is no path path from vertex to any other vertex that graph is considered to be ?

Select one of the following:

  • unconnected

  • undirected

  • DFS

  • BFS

  • weighted

Explanation

Question 8 of 183

1

Can we implement the queue using LinkedList?

Select one of the following:

  • yes

  • no

  • i don't know

  • maybe

  • i need to learn more about this

Explanation

Question 9 of 183

1

What is not perfect in this code: ave = sum / count;

Select one of the following:

  • 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

Explanation

Question 10 of 183

1

Returns the reference to the element at position index

Select one of the following:

  • get(index)

  • has(index)

  • goTo(index)

  • fly(index)

  • set(index)

Explanation

Question 11 of 183

1

Indicate exponential time complexity in terms of big-O notation?

Select one of the following:

  • O(2^n)

  • O(logn)

  • O(n^4)

  • O(nlogn)

  • O(n)

Explanation

Question 12 of 183

1

Traversing graph visiting a start node first, then all nodes that are adjacent to it next.

Select one of the following:

  • BFS

  • DFS

  • DIjkstra

  • matrix

  • preorder

Explanation

Question 13 of 183

1

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

Select one of the following:

  • sprase

  • dense

  • path

  • hence

  • directed

Explanation

Question 14 of 183

1

Which method returns an object at the top of a Stack in JAVA?

Select one of the following:

  • peek()

  • front()

  • top()

  • pop()

  • poll()

Explanation

Question 15 of 183

1

The ____________ algorithm finds minimum spanning tree for a graph.

Select one of the following:

  • prim

  • DFS

  • matrix

  • Dijkstra

  • BFS

Explanation

Question 16 of 183

1

traverese left subtree, Visit root node, traverse right subtree traversal is called?

Select one of the following:

  • inorder

  • postorder

  • preorder

Explanation

Question 17 of 183

1

Data structure based on BST where all items are sorted and unique is?

Select one of the following:

  • treeSet

  • tree

  • treeMap

  • vector

  • graph

Explanation

Question 18 of 183

1

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

Select one of the following:

  • connected

  • weighted

  • directed

  • unweighted

  • unconnected

Explanation

Question 19 of 183

1

What is the difference between ArrayList and Vector?

Select one of the following:

  • 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

Explanation

Question 20 of 183

1

Visit root node, traverese left subtree, traverse right subtree traversal is called?

Select one of the following:

  • preorder

  • inorder

  • postorder

Explanation

Question 21 of 183

1

First in last out structure is ...

Select one of the following:

  • stack

  • graph

  • queue

  • tree

Explanation

Question 22 of 183

1

Which container is not appropriate to implement Stack in Java?

Select one of the following:

  • graph

  • array

  • list

  • vector

Explanation

Question 23 of 183

1

Average time complexity of Bubble sort is?

Select one of the following:

  • O(n^2)

  • O(nlogn)

  • O(logn)

  • O(1)

  • O(n^3)

Explanation

Question 24 of 183

1

Every class has __________ as a superclass.

Select one of the following:

  • object

  • main

  • string

  • java

  • subject

Explanation

Question 25 of 183

1

traverse left subtree, traverse right subtree, visit root node traversal is called ?

Select one of the following:

  • postorder

  • preorder

  • inorder

Explanation

Question 26 of 183

1

A ___________ tree is a binary tree used to store a code that facilitates file compression.

Select one of the following:

  • Huffman

  • BFS

  • DFS

  • Dijkstra

  • heap

Explanation

Question 27 of 183

1

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

Select one of the following:

  • depth

  • height

  • path

  • subtree

  • root

Explanation

Question 28 of 183

1

The node of a tree without children is called ... ?

Select one of the following:

  • leaf

  • sibling

  • root

  • tree

  • subtree

Explanation

Question 29 of 183

1

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

Select one of the following:

  • queue

  • set

  • tree

  • stack

  • graph

Explanation

Question 30 of 183

1

A collision occurs when ... ?

Select one of the following:

  • 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

Explanation

Question 31 of 183

1

A __________ graph is one in which [E] is close to but less than [V]^2.

Select one of the following:

  • dense

  • sprase

  • directed

  • dark

  • hence

Explanation

Question 32 of 183

1

Average time complexity of Merge sort is?

Select one of the following:

  • O(nlogn)

  • O(n^2)

  • O(n^3)

  • O(n)

  • O(logn)

Explanation

Question 33 of 183

1

The _________ is used to implement the special kind of a queue called priority queue.

Select one of the following:

  • heap

  • BFS

  • DFS

  • BST

  • deap

Explanation

Question 34 of 183

1

Average time complexity of Shell sort is?

Select one of the following:

  • O(n^1.25)

  • O(1)

  • O(n)

  • O(logn)

  • O(n^2)

Explanation

Question 35 of 183

1

If there is at least one abstract method in a class, that class is called ...

Select one of the following:

  • abstract class

  • vanish class

  • tired class

  • recursive class

  • general class

Explanation

Question 36 of 183

1

Finding the shortest path algorithm is called?

Select one of the following:

  • Dijkstra

  • DFS

  • BFS

  • Binary Search

Explanation

Question 37 of 183

1

Which part is accessible to user?

Select one of the following:

  • public

  • private

  • protected

  • interacted

  • social

Explanation

Question 38 of 183

1

Dijkstra's algorithm use ______ algorithm to traverse all nodes.

Select one of the following:

  • BFS

  • DFS

  • matrix

  • tree

  • Prime's

Explanation

Question 39 of 183

1

A list can _________ or _________ as elements added or removed.

Select one of the following:

  • grow, shrink

  • increase, grow

  • fly, sit

  • decrease, think

  • flow, shrink

Explanation

Question 40 of 183

1

What is the time complexity of recursive Binary Search algorithm?

Select one of the following:

  • O(logn)

  • O(NxM)

  • O(nlogn)

  • O(n)

Explanation

Question 41 of 183

1

Why do we need BFS and DFS algorithms?

Select one of the following:

  • to traverse a graph

  • to measure graphh

  • to remove an item from graph

  • to find the way

  • to add new item in a graph

Explanation

Question 42 of 183

1

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.

Select one of the following:

  • quick

  • heap

  • merge

  • selection

  • bubble

Explanation

Question 43 of 183

1

Show the method which exists in DoubleLinkedList and not exist in SingleLinkedList?

Select one of the following:

  • previous()

  • next()

  • constructor

  • hasBefore()

  • hasNext()

Explanation

Question 44 of 183

1

What determines whether you should use quadratic sort or a logarithmic sort algorithm?

Select one of the following:

  • array size

  • array values

  • swapping conditions

  • array type

  • array index

Explanation

Question 45 of 183

1

The Collection is a _________ of a List

Select one of the following:

  • superinterface

  • node

  • interface

  • parent

  • father

Explanation

Question 46 of 183

1

The _________ level of a node is a measure of its distance from the root.

Select one of the following:

  • level

  • distance

  • parent

  • father

Explanation

Question 47 of 183

1

A queue _________ in ___________ out data structure.

Select one of the following:

  • first, first

  • set,get

  • last,last

  • first,last

  • last,first

Explanation

Question 48 of 183

1

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

Select one of the following:

  • indexOf(entry)

  • get(entry)

  • equals(entry)

  • set(entry)

Explanation

Question 49 of 183

1

______________ exception is an error normally not due to programmer.

Select one of the following:

  • checked

  • unchecked

  • cracked

  • hacked

Explanation

Question 50 of 183

1

______________ exception is an error normally due to programmer.

Select one of the following:

  • unchecked

  • checked

  • hacked

  • cracked

Explanation

Question 51 of 183

1

Distance from the deepest leaf to the root of a tree is called?

Select one of the following:

  • height

  • depth

  • leaf

  • tree

  • breadth

Explanation

Question 52 of 183

1

ListIterator and Iterator is the same thing in JAVA.

Select one of the following:

  • True
  • False

Explanation

Question 53 of 183

1

The function that calls itself is called ...

Select one of the following:

  • recursive function

  • functional function

  • defensive function

  • impressive function

Explanation

Question 54 of 183

1

If you want to call different constructor of current class you would use ...

Select one of the following:

  • this()

  • this.

  • super.

  • super()

Explanation

Question 55 of 183

1

Which method adds an item on the top of the Stack in JAVA?

Select one of the following:

  • push()

  • peek()

  • top()

  • add()

Explanation

Question 56 of 183

1

In open addressing you can not remove an item to be deleted, so what should you do instead?

Select one of the following:

  • mark as deleted flag

  • go home and dance

  • delete and save in temporary list

  • change its place with another item

  • do nothing

Explanation

Question 57 of 183

1

What is the best time complexity of recursively finding fibbonachi nuber?

Select one of the following:

  • O(n)

  • H2O

  • O(n^2)

  • O(logn)

  • O(1)

Explanation

Question 58 of 183

1

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

Select one of the following:

  • path

  • graph

  • route

  • cycle

  • weight

Explanation

Question 59 of 183

1

Searching a binary search tree costs?

Select one of the following:

  • O(logn)

  • O(n)

  • O(1)

  • O(n^2)

Explanation

Question 60 of 183

1

Average time complexity of Selection sort is?

Select one of the following:

  • O(n^2)

  • O(nlogn)

  • O(logn)

  • O(n)

Explanation

Question 61 of 183

1

Full name of this course is ?

Select one of the following:

  • Algorithms and Data Structures

  • SDP4

  • Programming with Java

  • Basic circuit theory

  • Algoritmization and programming language

Explanation

Question 62 of 183

1

In ___________ graph is {v, u} is edge then {u, v} is not necessary an edge.

Select one of the following:

  • directed

  • undirected

  • weighted

  • connected

Explanation

Question 63 of 183

1

Average time complexity of Quick sort is?

Select one of the following:

  • O(nlogn)

  • O(logn)

  • O(n)

  • O(1)

Explanation

Question 64 of 183

1

Ideal data structure for a contact list is ?

Select one of the following:

  • map

  • vector

  • graph

  • tree

  • set

Explanation

Question 65 of 183

1

Each recursive function has two cases ________ and _________.

Select one of the following:

  • base, recursive

  • continued, stopped

  • looped, switched

  • lelik, bolik

  • base,defensive

Explanation

Question 66 of 183

1

Array reallocation cost is ______?

Select one of the following:

  • O(n)

  • O(1)

  • O(logn)

  • O(nlogn)

  • O(n^2)

Explanation

Question 67 of 183

1

It is possible to implement all recursive algorithms without recursion

Select one of the following:

  • True
  • False

Explanation

Question 68 of 183

1

Set of connections between vertices of a graph is called?

Select one of the following:

  • edge

  • vertex

  • roof

  • path

  • cycle path

Explanation

Question 69 of 183

1

Hiding access to data members of a class is called ...

Select one of the following:

  • Encapsulation

  • Overloading

  • Overriding

  • Inheritance

  • Polymorphism

Explanation

Question 70 of 183

1

Using a hash table enables us to retrive an item in a __________ time.

Select one of the following:

  • constant

  • linear

  • average

  • nlogn

  • logarithmic

Explanation

Question 71 of 183

1

Is it possible to implement multiple interfaces?

Select one of the following:

  • True
  • False

Explanation

Question 72 of 183

1

Sets the element on position index to reference entry

Select one of the following:

  • set(index, entry)

  • entry.set(index)

  • index.set(entry)

  • setTo(index, entry)

  • set.index(entry)

Explanation

Question 73 of 183

1

Which of the graph implementation is more efficient in terms of memory usage?

Select one of the following:

  • list

  • BFS

  • map

  • matrix

  • set

Explanation

Question 74 of 183

1

In the queue implemented as a LinkedList, poll() function should ...

Select one of the following:

  • remove first added item

  • remove last added item

  • play with items

  • remove middle item

  • add new item

Explanation

Question 75 of 183

1

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

Select one of the following:

  • offer()

  • poll()

  • add()

  • suffer()

  • remove()

Explanation

Question 76 of 183

1

Recursive solutions are more beautiful and easy to understand.

Select one of the following:

  • True
  • False

Explanation

Question 77 of 183

1

Which structure is widely used to calculate the value of postfix expression?

Select one of the following:

  • Stack

  • Array

  • Set

  • String

  • Queue

Explanation

Question 78 of 183

1

This returns true if the collection contains obj.

Select one of the following:

  • contains(obj)

  • goTO(obj)

  • indexF(obj)

  • find(obj)

  • indexOf(obj)

Explanation

Question 79 of 183

1

Redefinition of the method of superclass in a subclass with the same name and number of parameters is...

Select one of the following:

  • override

  • overload

  • overbeat

  • overhead

  • upperload

Explanation

Question 80 of 183

1

If you want to call the constructor of superclass you would use ...

Select one of the following:

  • super()

  • this()

  • this.

  • super.

  • constructor()

Explanation

Question 81 of 183

1

Element insertion to a Binary Search tree costs?

Select one of the following:

  • O(logn)

  • O(1)

  • O(n)

  • O(n^2)

  • O(f(n))

Explanation

Question 82 of 183

1

Distance from the deepest leaf to the root of a tree is called?

Select one of the following:

  • height

  • breadth

  • leaf

  • tree

  • depth

Explanation

Question 83 of 183

1

What is the time complexity of adding an item in front of a LinkedList?

Select one of the following:

  • O(1)

  • O(n)

  • O(n^2)

  • O(n^3)

  • O(nlogn)

Explanation

Question 84 of 183

1

The collection of abstract methods is called?

Select one of the following:

  • interface

  • function

  • abstract class

  • class

  • method

Explanation

Question 85 of 183

1

This method returns a string that textually represents an object.

Select one of the following:

  • toString()

  • toGo()

  • toText()

  • equals()

  • hashCode()

Explanation

Question 86 of 183

1

Graph where each edge has a direction is called?

Select one of the following:

  • directed

  • wayed

  • mapped

  • strong

  • stricted

Explanation

Question 87 of 183

1

Which of the following is not example of visibility in JAVA.

Select one of the following:

  • Eclipsed

  • Public

  • Private

  • Protected

  • Package

Explanation

Question 88 of 183

1

A tree where left child is less and right child is more than its parent called?

Select one of the following:

  • Binary Search Tree

  • Binary tree

  • Huffman tree

  • Breadth first search

  • DFS

Explanation

Question 89 of 183

1

How to handle exceptions

Select one of the following:

  • try{}catch(){}

  • try{}batch(){}

  • fly{}catch(){}

  • poimai{}menya{}esli{}smozhesh()

  • go{}home()

Explanation

Question 90 of 183

1

Is it possible to inherit from multiple classes?

Select one of the following:

  • True
  • False

Explanation

Question 91 of 183

1

Vertex is ________ to another vertex if there is an edge connecting them.

Select one of the following:

  • adjacent

  • brotherhood

  • sibling

  • BFS

  • DIJkstra

Explanation

Question 92 of 183

1

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

Select one of the following:

  • collision

  • duplicate

  • decision

  • error

  • mistake

Explanation

Question 93 of 183

1

Returns entry at the front of a Deque without removing it

Select one of the following:

  • peekFirst()

  • pollFirst()

  • popFirst()

  • takeFirst()

  • get(index)

Explanation

Question 94 of 183

1

Complete binary tree where all children must be bigger than parents is ?

Select one of the following:

  • minheap

  • maxheap

  • fullheap

  • hiphop

  • treeheap

Explanation

Question 95 of 183

1

Which function return first added item in the queue?

Select one of the following:

  • element ()

  • giveMeFirst

  • goBack()

  • first()

  • front()

Explanation

Question 96 of 183

1

Gets the size of the ArrayList

Select one of the following:

  • size()

  • sizeOf()

  • length(list)

  • size(list)

  • length

Explanation

Question 97 of 183

1

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

Select one of the following:

  • DFS

  • BFS

  • matrix

  • tree

  • DIjkstra

Explanation

Question 98 of 183

1

The relationship when one class is a subclass of another is called ...

Select one of the following:

  • is-a

  • has-a

  • to-c

  • is-b

  • has-b

Explanation

Question 99 of 183

1

Recursive nonlinear data structure that is used to represent data organized in a hirarchy?

Select one of the following:

  • tree

  • vector

  • graph

  • arrayList

  • linkedList

Explanation

Question 100 of 183

1

Which of them is not an example of Data Structure

Select one of the following:

  • Breadth First Search

  • Graph

  • ArrayList

  • Set

  • Priority Queue

Explanation

Question 101 of 183

1

Two JAVA API implementation of Set and Map are:

Select one of the following:

  • tree and hash

  • graph and tree

  • list and hash

  • graph and vector

  • tree and list

Explanation

Question 102 of 183

1

Which of them is not a feature of Collection Interface?

Select one of the following:

  • graph

  • set

  • queue

  • vector

  • list

Explanation

Question 103 of 183

1

Indicate two ways of graph implementations

Select one of the following:

  • list and matrix

  • tree and hash

  • set and map

  • array and vector

  • queue and stack

Explanation

Question 104 of 183

1

Indicate logarithmic time complexity in terms of big-O notation?

Select one of the following:

  • O(logn)

  • O(1)

  • O(n)

  • O(2)

  • O(done)

Explanation

Question 105 of 183

1

What are the two parts of ADT?

Select one of the following:

  • Private and Public

  • ArrayList and Vector

  • Parent and Child

  • Int and Float

  • Queue and Stack

Explanation

Question 106 of 183

1

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

Select one of the following:

  • get

  • equals

  • set

  • size

  • goHome

Explanation

Question 107 of 183

1

Indicate the relationship of HashtableOpen and Entry classes?

Select one of the following:

  • has-a

  • is-a

  • is-b

  • static

  • public

Explanation

Question 108 of 183

1

Which method removes an item on the top of a Stack in JAVA?

Select one of the following:

  • pop()

  • peek()

  • hop()

  • drop()

  • remove()

Explanation

Question 109 of 183

1

How to remove item from LinkedList?

Select one of the following:

  • 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

Explanation

Question 110 of 183

1

Find the slowest time

Select one of the following:

  • O(n!)

  • O(n)

  • O(2^n)

  • O(100)

  • O(n^4)

Explanation

Question 111 of 183

1

Node of a graph is called?

Select one of the following:

  • vertex

  • edge

  • path

  • weight

  • dijkstra

Explanation

Question 112 of 183

1

calculate the value of "4 7 * 20 -"

Select one of the following:

  • 8

  • 136

  • 3

  • 144

  • 1

Explanation

Question 113 of 183

1

Complete binary tree where all children must be smaller than parents is ?

Select one of the following:

  • maxheap

  • minheap

  • fullheap

  • hiphop

  • treeheap

Explanation

Question 114 of 183

1

The relationship when one class is defined inside the definition of another is called...

Select one of the following:

  • has-a

  • is-a

  • is-b

  • has-b

  • to-c

Explanation

Question 115 of 183

1

Prim's algorithm is used to calculate __________.

Select one of the following:

  • the minimum spanning tree of a graph

  • BFS

  • DFS

  • cyclic path

  • direction path

Explanation

Question 116 of 183

1

Which of them has more methods?

Select one of the following:

  • subclass

  • superclass

Explanation

Question 117 of 183

1

A ___________ of a node is a tree whose root is a child of that node.

Select one of the following:

  • subtree

  • leaf

  • root

  • child

  • parent

Explanation

Question 118 of 183

1

Structured set of data is called _______.

Select one of the following:

  • data structure

  • set of data

  • algorithm

  • data pattern

  • design of data

Explanation

Question 119 of 183

1

Circular Array is usually used to implement ...

Select one of the following:

  • queue

  • tree

  • stack

  • graph

  • shreck

Explanation

Question 120 of 183

1

int xxx(int x){
if(n==1) return 1;
return x*xxx(x-1);
}
this function calculates

Select one of the following:

  • n!

  • fibbonachi

  • x^n

  • 2^n

  • x/n

Explanation

Question 121 of 183

1

JAVA API uses ____________ to implement both Set and Map interfaces.

Select one of the following:

  • hash table

  • vector

  • tree table

  • arraylist

  • graph

Explanation

Question 122 of 183

1

Average time complexity of Insertion sort is?

Select one of the following:

  • O(n^2)

  • O(2^n)

  • O(1)

  • O(logn)

  • O(nlogn)

Explanation

Question 123 of 183

1

What is the time complexity of ArrayList remove(index) method?

Select one of the following:

  • O(n)

  • O(n^3)

  • O(1)

  • O(nlogn)

  • O(nxn)

Explanation

Question 124 of 183

1

Does binary search tree contain duplicates?

Select one of the following:

  • no

  • yes

  • i have to go

  • i don't know

  • maybe

Explanation

Question 125 of 183

1

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

Select one of the following:

  • linear search

  • deep sort

  • heap sort

  • binary search

  • merge sort

Explanation

Question 126 of 183

1

Would an operating system use stack or queue to determine which print job should be handled next?

Select one of the following:

  • queue

  • tree

  • stack

  • set

  • graph

Explanation

Question 127 of 183

1

What is popularly used to traverse SingleLinkedList?

Select one of the following:

  • iterator

  • loop and switch

  • interface

  • commutator

  • traversator

Explanation

Question 128 of 183

1

Quadratic probing is usually used to ?

Select one of the following:

  • reduce collisions

  • enlarge table size

  • reallocate array

  • for fun

  • calculate x^2

Explanation

Question 129 of 183

1

To apply Dijkstra's algorithm graph should be.

Select one of the following:

  • weighted

  • directed

  • isomorphic

  • undirected

  • cyclic

Explanation

Question 130 of 183

1

Inventor of merge sort is ?

Select one of the following:

  • John von Neumann

  • John Lennon

  • Van der Sar

  • Mr Merge

  • Professor Sortmerg

Explanation

Question 131 of 183

1

instanceof used to test ...

Select one of the following:

  • 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

Explanation

Question 132 of 183

1

Most sorting algorithm are divided into two basic groups.

Select one of the following:

  • fast and slow

  • sort and search

  • best and worst

  • go and play

  • ordered and unordered

Explanation

Question 133 of 183

1

Attempt to convert a string that is not numeric to a number faults ...

Select one of the following:

  • NumberFormatException

  • ArithmeticException

  • DoNotSpeakException

  • SDP4IsNotSubjectException

  • BadProgrammerException

Explanation

Question 134 of 183

1

Average time complexity of Heap sort is?

Select one of the following:

  • O(nlogn)

  • O(n)

  • O(1)

  • H2O

  • O(n^2)

Explanation

Question 135 of 183

1

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.

Select one of the following:

  • O(1)

  • O(n)

  • O(n^2)

  • O(logn)

  • O(nlogn)

Explanation

Question 136 of 183

1

Data structure similar to tree but it doesn't have limitation according to number of parents is?

Select one of the following:

  • graph

  • tree

  • treeset

  • queue

  • dequeue

Explanation

Question 137 of 183

1

Set of ordered pairs whose element are known as the key and value is ?

Select one of the following:

  • map

  • set

  • graph

  • array

  • too easy for me

Explanation

Question 138 of 183

1

Ability of object of one class to act like it is an object of another class is?

Select one of the following:

  • Polymorphism

  • Encapsulation

  • Java code

  • Inheritance

  • SLOC(Source line of code)

Explanation

Question 139 of 183

1

A ________ is a special cas of a graph. A ________ is a connected graph that contain no cycles.

Select one of the following:

  • tree,tree

  • matrix,list

  • set,map

  • BFS,DFS

  • tree,hash

Explanation

Question 140 of 183

1

What relationship class Node and LinkedList have?

Select one of the following:

  • has-a

  • is-a

  • to-c

  • is-b

  • has-b

Explanation

Question 141 of 183

1

Which of the following is recursive algorithm?

Select one of the following:

  • quicksort

  • selectionsort

  • insertionsort

  • bubblesort

  • all of them are recursive

Explanation

Question 142 of 183

1

Can we access the element of a set by index?

Select one of the following:

  • no

  • yes

  • maybe

Explanation

Question 143 of 183

1

List two ways of organizing hashtable.

Select one of the following:

  • open addressing and chaining

  • breadth first search and depth first search

  • key and value

  • arraylist and vector

  • prime's and dijkstra

Explanation

Question 144 of 183

1

This method of a binary tree class return true if tree is a leaf and false otherwise?

Select one of the following:

  • isLeaf()

  • isEmpty()

  • noMore()

  • isLast()

  • goHome()

Explanation

Question 145 of 183

1

ADT that enables a user to access information (data) corresponding to a specified key.

Select one of the following:

  • map

  • led

  • set

  • queue

  • graph

Explanation

Question 146 of 183

1

An ordered set of instructions is called.

Select one of the following:

  • algorithm

  • hello world

  • pseudocode

  • data structure

  • array

Explanation

Question 147 of 183

1

OOP stands for?

Select one of the following:

  • Object oriented programming

  • Omar oriented programming

  • Object oriented playing

  • Obstacle oriented programming

  • OOP is the keyword of Java programming and stands for nothing

Explanation

Question 148 of 183

1

Is it possible to traverse contaning of a list this way?
for( int nextInt : aList ){ ... }

Select one of the following:

  • yes

  • no

  • maybe

  • i don't know

Explanation

Question 149 of 183

1

Which structure is widely used in finding palindrome problem?

Select one of the following:

  • stack

  • queue

  • graph

  • set

  • map

Explanation

Question 150 of 183

1

Adding an item to the beginning of CircularArray costs?

Select one of the following:

  • O(1)

  • O(logn)

  • O(n)

  • O(n^2)

  • 7 iterations

Explanation

Question 151 of 183

1

What is the attribute of CircularList?

Select one of the following:

  • 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

Explanation

Question 152 of 183

1

Attempt to access array element using index less than 0 faults ...

Select one of the following:

  • ArrayIndexOutOfBoundsException

  • InputMismatchException

  • ArithmeticException

  • MCDonerException

  • GoHomeException

Explanation

Question 153 of 183

1

What does method empty return for empty stack?

Select one of the following:

  • true

  • false

  • nothing

  • empty

  • hello

Explanation

Question 154 of 183

1

Elements of a List are accessed by means of an __________

Select one of the following:

  • index

  • position

  • loop

  • switch

  • book

Explanation

Question 155 of 183

1

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

Select one of the following:

  • first

  • second

  • middle

  • third

  • last

Explanation

Question 156 of 183

1

This method associates specified value with the specified key in the map.

Select one of the following:

  • put(key, value)

  • set(key, value)

  • get(key, value)

  • associate(key, value)

  • key.set(value)

Explanation

Question 157 of 183

1

Indicate linear time complexity in terms of big-O notation?

Select one of the following:

  • O(n)

  • O(loglogn)

  • O(logn)

  • O(n^2)

  • O(n^3)

Explanation

Question 158 of 183

1

A tree where all nodes should have 2 children and leaves have no children is called?

Select one of the following:

  • full binary tree

  • binary tree

  • unary tree

  • general tree

Explanation

Question 159 of 183

1

Insert and remove items from a heap costs?

Select one of the following:

  • O(logn)

  • O(nlogn)

  • O(n)

  • O(n^2)

  • O(1)

Explanation

Question 160 of 183

1

What is the time complexity of adding element in the beginning of ArrayList?

Select one of the following:

  • O(n)

  • O(nlogn)

  • O(logn)

  • O(n^2)

  • O(25)

Explanation

Question 161 of 183

1

Adjacent matrix representing undirected graph should be?

Select one of the following:

  • symmetric

  • triangular

  • linear

  • diagonal

  • orthognal

Explanation

Question 162 of 183

1

Which of the following in java is very similar to "contract"?

Select one of the following:

  • Interface implementation

  • Class overriding

  • Class inheritance

  • Dancing in a queue

  • Method overloading

Explanation

Question 163 of 183

1

Where new item added in the queue?

Select one of the following:

  • to the end

  • position chosen randomly

  • in the middle

  • in the beginning

  • it is impossible to add new item in the queue

Explanation

Question 164 of 183

1

Which method searches for target and returns its position in LinkedList?

Select one of the following:

  • indexOf(target)

  • get(target)

  • set(target)

  • go(target)

  • equal(target)

Explanation

Question 165 of 183

1

A ___________ path is a simple path in which only the first and last items are the same.

Select one of the following:

  • cycle

  • tour

  • mapped

  • trip

  • looped

Explanation

Question 166 of 183

1

Graph where each edge has a direction is called?

Select one of the following:

  • directed

  • sticked

  • strong

  • wayed

  • mapped

Explanation

Question 167 of 183

1

Redefinition of method with the same name but different number of parameters is called...

Select one of the following:

  • overload

  • override

  • inheritance

  • polymorphism

  • encapsulation

Explanation

Question 168 of 183

1

Recursive implementation works faster than lopped one.

Select one of the following:

  • True
  • False

Explanation

Question 169 of 183

1

If there are no abstract methods in the class we call that class ...

Select one of the following:

  • Actual Class

  • Abstract Class

  • Non abstract Class

  • Super Class

  • Funny Class

Explanation

Question 170 of 183

1

Which part is not accessible to user?

Select one of the following:

  • Private

  • Based

  • Controlled

  • Shifted

  • Public

Explanation

Question 171 of 183

1

What is the time complexity of insert(index) method in ArrayList

Select one of the following:

  • O(n)

  • O(logn)

  • O(1)

  • O(n^2)

  • O(100)

Explanation

Question 172 of 183

1

What is the feature of Deque?

Select one of the following:

  • 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

Explanation

Question 173 of 183

1

The function that calls itself is called ...

Select one of the following:

  • recursive function

  • functional function

  • defensive function

  • overloaded function

  • impressive function

Explanation

Question 174 of 183

1

int xxx(int x, int y, int z){
if(z==1){return 1;}
return xxx(x+y, x, z-1);
}
this function is

Select one of the following:

  • Fibbonachi

  • it is trash function

  • x^n

  • n!

  • 2^n

Explanation

Question 175 of 183

1

What is the time complexity of Linear Search algorithm?

Select one of the following:

  • O(n)

  • O(nlogn)

  • O(1)

  • O(n^2)

  • O(logn)

Explanation

Question 176 of 183

1

The node of a tree without children is called ... ?

Select one of the following:

  • leaf

  • tree

  • siblin

  • root

  • subtree

Explanation

Question 177 of 183

1

Tree where every item must have at most 2 children is called?

Select one of the following:

  • Binary Tree

  • General Tree

  • Huffman Tree

  • Generic Tree

  • Unary Tree

Explanation

Question 178 of 183

1

What is the benefit of encoding letters trough Huffman tree.

Select one of the following:

  • earning space

  • more beautiful

  • just for fun

  • it is simple

  • it is smart

Explanation

Question 179 of 183

1

A set view of a map can be obtained through method_______?

Select one of the following:

  • entrySet

  • emptySet

  • setView

  • viewAsSet

  • goAhead

Explanation

Question 180 of 183

1

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

Select one of the following:

  • iterator

  • preorder

  • accessor

  • traversal

  • posorder

Explanation

Question 181 of 183

1

If you want to call data member of superclass you would use ...

Select one of the following:

  • super.

  • this.

  • this()

  • super()

  • method

Explanation

Question 182 of 183

1

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

Select one of the following:

  • shortest

  • deepest

  • longest

  • easiest

  • binary

Explanation

Question 183 of 183

1

A Stack is __________ in _________ out data structure.

Select one of the following:

  • last,first

  • first,first

  • back, top

  • end,end

  • front,front

Explanation