1610 R
Quiz por , criado more than 1 year ago

Quiz sobre sdp4, criado por 1610 R em 24-05-2018.

345
1
0
Sem etiquetas
1610 R
Criado por 1610 R quase 6 anos atrás
Fechar

sdp4

Questão 1 de 187

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.

Selecione uma das seguintes:

  • quick

  • merge

  • bubble

  • heap

Explicação

Questão 2 de 187

1

Inventor of merge sort is ?

Selecione uma das seguintes:

  • John von Neumann

  • Mr Merge

  • John Lennon

  • Professor Sortmerg

Explicação

Questão 3 de 187

1

А collision occurs when ... ?

Selecione uma das seguintes:

  • 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

Explicação

Questão 4 de 187

1

What are the two parts of ADT?

Selecione uma das seguintes:

  • private, public

  • methods and data fields

  • Parent and Child

  • Int and Float

  • Queue and Stack

Explicação

Questão 5 de 187

1

List two ways of organizing hashtable.

Selecione uma das seguintes:

  • open addressing and chaining

  • key and value

  • arraylist and vector

  • Breadth first search and Depth first search

Explicação

Questão 6 de 187

1

Which of them has more methods?

Selecione uma das seguintes:

  • Subclass

  • Superclass

  • Parentclass

  • Object

Explicação

Questão 7 de 187

1

Indicate the relationship of HastableOpen and Entry classes?

Selecione uma das seguintes:

  • has-a

  • static

  • is-b

  • is-a

Explicação

Questão 8 de 187

1

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

Selecione uma das seguintes:

  • has-a

  • is

  • is-a

Explicação

Questão 9 de 187

1

Which of them is NOT an example of Data Structure ?

Selecione uma das seguintes:

  • ArrayList

  • Breadth First Search

  • Set

  • Priority Queue

  • Graph

Explicação

Questão 10 de 187

1

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

Selecione uma das seguintes:

  • Override

  • Overload

  • Public

  • Encapsulation

Explicação

Questão 11 de 187

1

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

Selecione uma das seguintes:

  • entrySet

  • setView

  • goAhead

  • emptySet

Explicação

Questão 12 de 187

1

Which of them is NOT feature of collection interface ?

Selecione uma das seguintes:

  • Graph

  • List

  • Queue

  • Vector

  • Set

Explicação

Questão 13 de 187

1

Redefinition of method with the same name but different number of parameters?

Selecione uma das seguintes:

  • Overload

  • Override

  • Encapsulation

  • Polymorphism

Explicação

Questão 14 de 187

1

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

Selecione uma das seguintes:

  • Super()

  • Parent()

  • that()

Explicação

Questão 15 de 187

1

Quadratic probing is usually used to ?

Selecione uma das seguintes:

  • reduce collisions

  • reallocate array

  • for fun

  • enlarge table size

Explicação

Questão 16 de 187

1

This returns TRUE if the collection contains object

Selecione uma das seguintes:

  • Find(obj)

  • goTo(obj)

  • indexF(obj)

  • contains(obj)

  • indexOf(obj)

Explicação

Questão 17 de 187

1

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

Selecione uma das seguintes:

  • this()

  • that()

  • anay()

  • which()

Explicação

Questão 18 de 187

1

Elements of a List are accessed by means of an

Selecione uma das seguintes:

  • index

  • position

  • book

  • loop

  • switch

Explicação

Questão 19 de 187

1

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

Selecione uma das seguintes:

  • set

  • map

  • graph

  • array

Explicação

Questão 20 de 187

1

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

Selecione uma das seguintes:

  • Abstract class

  • Child class

  • Parent class

  • Not given

Explicação

Questão 21 de 187

1

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

Selecione uma das seguintes:

  • Actual class

  • Abstract class

  • Parent

  • Superclass

Explicação

Questão 22 de 187

1

A list can ___ or ___ as items(elements) are added or removed

Selecione uma das seguintes:

  • flow, shrink

  • grow, shrink

  • decrease, think

  • fly, sit

  • increase, grow

Explicação

Questão 23 de 187

1

Is it possible to inherit from multiple classes ?

Selecione uma das seguintes:

  • No

  • Yes

Explicação

Questão 24 de 187

1

Is it possible to implement multiple interfaces?

Selecione uma das seguintes:

  • no

  • yes

Explicação

Questão 25 de 187

1

The Collection is a _____ of a List ?

Selecione uma das seguintes:

  • superinterface

  • father

  • node

  • parent

  • interface

Explicação

Questão 26 de 187

1

Every class has _____as a superclass

Selecione uma das seguintes:

  • Object(parent of classes)

  • Object(childof classes)

  • Superclass

  • int

Explicação

Questão 27 de 187

1

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

Selecione uma das seguintes:

  • top()

  • pop()

  • front()

  • peek()

  • poll()

Explicação

Questão 28 de 187

1

InstanceOf used to test

Selecione uma das seguintes:

  • Whether an object belongs to class or not

  • Division by zero may occur

  • class belongs to object

Explicação

Questão 29 de 187

1

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

Selecione uma das seguintes:

  • add()

  • top()

  • peek()

  • push()

  • bush()

Explicação

Questão 30 de 187

1

Two JAVA API Implementation of Set and Map are

Selecione uma das seguintes:

  • tree and hash

  • graph and vector

  • list and hash

  • tree and list

Explicação

Questão 31 de 187

1

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

Selecione uma das seguintes:

  • Division by zero may occur

  • Division by one may occur

  • nothing

  • not given

Explicação

Questão 32 de 187

1

First in last out structure is...

Selecione uma das seguintes:

  • Tree

  • Graph

  • Set

  • Queue

  • Stack

Explicação

Questão 33 de 187

1

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

Selecione uma das seguintes:

  • NumberFormatException

  • ArrayIndexOutOfBoundsException

  • DivisionByZero

Explicação

Questão 34 de 187

1

Which structure is widely used in finding palindrome problem?

Selecione uma das seguintes:

  • Map

  • Stack

  • Graph

  • Queue

  • Set

Explicação

Questão 35 de 187

1

Average time complexity of Insertion sort is?

Selecione uma das seguintes:

  • O(n^2)

  • O(1)

  • O(nlogn)

  • O(logn)

  • O(n)

Explicação

Questão 36 de 187

1

Attempt to access array element using index less than zero folds

Selecione uma das seguintes:

  • ArrayIndexOutOfBoundsException

  • NumberFormatException

  • OutOfBoundsException

Explicação

Questão 37 de 187

1

Which container is not appropriate to implement Stack in JAVA?

Selecione uma das seguintes:

  • Array

  • Graph

  • List

  • Vector

Explicação

Questão 38 de 187

1

________ exception is an error normally due to programmer

Selecione uma das seguintes:

  • unchecked

  • checked

  • not given

  • null

Explicação

Questão 39 de 187

1

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

Selecione uma das seguintes:

  • String

  • Array

  • Set

  • Stack

  • Queue

Explicação

Questão 40 de 187

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.

Selecione uma das seguintes:

  • O(1)

  • O(n)

  • O(n^2)

  • O(nlogn)

  • O(logn)

Explicação

Questão 41 de 187

1

________ exception is an error normally not due to programmer

Selecione uma das seguintes:

  • unchecked

  • checked

  • null

  • not given

Explicação

Questão 42 de 187

1

Calculate value of "4 7 * 20 - "

Selecione uma das seguintes:

  • 1

  • 3

  • 136

  • 8

  • 144

Explicação

Questão 43 de 187

1

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

Selecione uma das seguintes:

  • Map

  • Queue

  • Set

  • Graph

Explicação

Questão 44 de 187

1

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

Selecione uma das seguintes:

  • Inheritance

  • Polymorphism

  • Encapsulation

  • Java code

  • SLOC (Source Line of Code)

Explicação

Questão 45 de 187

1

What does method empty return for empty stack?

Selecione uma das seguintes:

  • nothing

  • empty

  • hello

  • true

  • false

Explicação

Questão 46 de 187

1

Which of the following is not example of visibility in Java ?

Selecione uma das seguintes:

  • Eclipse

  • JetBrains

  • NetBeans

Explicação

Questão 47 de 187

1

Waiting line of people is similar to which data structure?

Selecione uma das seguintes:

  • Graph

  • Stack

  • Queue

  • Tree

  • LinkedList

Explicação

Questão 48 de 187

1

Sets the element on position Index to reference entry

Selecione uma das seguintes:

  • Set (Index, Entry )

  • GEt(Index, Entry)

  • Nothing

  • Set(Entry)

Explicação

Questão 49 de 187

1

Average time complexity of Merge sort is?

Selecione uma das seguintes:

  • O(nlogn)

  • O(1)

  • O(logn)

  • O(n)

  • O(n^2)

Explicação

Questão 50 de 187

1

You can reference an object of a ___ type through a variable of a ___ type

Selecione uma das seguintes:

  • subclass, superclass

  • superclass, subclass

  • subclass, parent class

  • interface, subclass

Explicação

Questão 51 de 187

1

Most sorting algorithm are divided into two basic groups.

Selecione uma das seguintes:

  • fast and slow

  • go amd play

  • sort and search

  • ordered and unordered

Explicação

Questão 52 de 187

1

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

Selecione uma das seguintes:

  • O(n)

  • O(n^2)

  • O(1)

  • O(n^3)

Explicação

Questão 53 de 187

1

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 –___ :

Selecione uma das seguintes:

  • subclass, superclass, subclass, downcast

  • superclass, subclass, subclass, downcast

  • subclass, subclass, superclass, downcast

  • subclass, subclass, downcast, superclass

Explicação

Questão 54 de 187

1

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

Selecione uma das seguintes:

  • Set

  • Queue

  • Graph

  • Stack

  • Tree

Explicação

Questão 55 de 187

1

What is the difference between ArrayList and Vector?

Selecione uma das seguintes:

  • Vector is synchronized, where ArrayList is not

  • there are same

  • ArrayLIst is synchronized, where Vectoris not

Explicação

Questão 56 de 187

1

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

Selecione uma das seguintes:

  • hash table

  • tree table

  • vector

  • graph

  • ArrayList

Explicação

Questão 57 de 187

1

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

Selecione uma das seguintes:

  • third

  • second

  • middle

  • first

  • last

Explicação

Questão 58 de 187

1

Each node is a single-linked list, has a reference to__ and __

Selecione uma das seguintes:

  • next node, previous node

  • next node, data

  • data, next node

  • implement, next node

Explicação

Questão 59 de 187

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

Selecione uma das seguintes:

  • IndexOf(entry)

  • number

  • IndexOf(cell)

  • not given

Explicação

Questão 60 de 187

1

What function return first added item in the queue?

Selecione uma das seguintes:

  • giveMeFirst()

  • front()

  • first()

  • goBack()

  • element()

Explicação

Questão 61 de 187

1

Indicate constant time complexity in terms of Big-O notation

Selecione uma das seguintes:

  • O(1)

  • O(n)

  • O(n^2)

  • O(n^3)

Explicação

Questão 62 de 187

1

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

Selecione uma das seguintes:

  • put(key,value)

  • set(key,value)

  • get(key,value)

  • key.set(key,value)

Explicação

Questão 63 de 187

1

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

Selecione uma das seguintes:

  • add()

  • suffer()

  • remove()

  • offer()

  • poll()

Explicação

Questão 64 de 187

1

The collection of abstract methods is called

Selecione uma das seguintes:

  • Interface

  • Polymorphism

  • Super()

  • Tree

Explicação

Questão 65 de 187

1

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

Selecione uma das seguintes:

  • log(n)

  • log(1)

  • log(n^2)

  • log(n^3)

Explicação

Questão 66 de 187

1

Average time complexity of Shell sort is?

Selecione uma das seguintes:

  • O(n^1.25)

  • O(n)

  • O(n^2)

  • O(nlogn)

  • O(1)

Explicação

Questão 67 de 187

1

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

Selecione uma das seguintes:

  • n

  • logn

  • n^2

  • n^3

Explicação

Questão 68 de 187

1

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

Selecione uma das seguintes:

  • O(2^n)

  • O(3^n)

  • O(1)

  • O(n)

Explicação

Questão 69 de 187

1

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

Selecione uma das seguintes:

  • array size

  • array indexes

  • array type

  • array values

  • swapping conditions

Explicação

Questão 70 de 187

1

Find the slowest time

Selecione uma das seguintes:

  • O(n!)

  • O(1)

  • O(logn)

  • O(n^2)

Explicação

Questão 71 de 187

1

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

Selecione uma das seguintes:

  • O(n)

  • O(1)

  • O(n^2)

  • O(n^3)

Explicação

Questão 72 de 187

1

In a double-linked list, each node has a reference to: ___, ___and ___

Selecione uma das seguintes:

  • next node, previous node, data

  • implement, data, next node

  • next node, data, previous node

  • data, next node previous node

Explicação

Questão 73 de 187

1

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

Selecione uma das seguintes:

  • mark as deleted flag

  • do nothing

  • delete and save in temporary list

  • change its palce with another item

Explicação

Questão 74 de 187

1

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

Selecione uma das seguintes:

  • O(1)

  • O(n)

  • O(n!)

  • O(logn)

Explicação

Questão 75 de 187

1

Average time complexity of Bubble sort is?

Selecione uma das seguintes:

  • O(n^2)

  • O(nlogn)

  • O(1)

  • O(n)

  • O(logn)

Explicação

Questão 76 de 187

1

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

Selecione uma das seguintes:

  • O(n^2)

  • O(n)

  • O(1)

  • O(mxn)

  • O(logn)

Explicação

Questão 77 de 187

1

To remove an item from a single -linked list, you need a reference to

Selecione uma das seguintes:

  • previous node

  • next node

  • data

  • the node

Explicação

Questão 78 de 187

1

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

Selecione uma das seguintes:

  • O(n)

  • O(n!)

  • O(1)

  • O(logn)

Explicação

Questão 79 de 187

1

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

Selecione uma das seguintes:

  • collision

  • error

  • mistake

  • duplicate

Explicação

Questão 80 de 187

1

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

Selecione uma das seguintes:

  • peek()

  • pop()

  • hop()

  • remove()

  • drop()

Explicação

Questão 81 de 187

1

To remove an item from a double -linked list, you need a reference to

Selecione uma das seguintes:

  • data

  • node

  • next

  • previous node

Explicação

Questão 82 de 187

1

Which method searches for target and returns its position in LinkedList

Selecione uma das seguintes:

  • IndexOf(target)

  • IndexOf(cell)

  • Not given

  • ArrayIndexOutOfBloundException

Explicação

Questão 83 de 187

1

Inheritance is:

Selecione uma das seguintes:

  • 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

Explicação

Questão 84 de 187

1

Hiding access to data members of a class is called:

Selecione uma das seguintes:

  • Polymorphism

  • Encapsulation

  • Inheritence

  • None of them

Explicação

Questão 85 de 187

1

An iterator allows us to access items of a list

Selecione uma das seguintes:

  • sequentially

  • ordinal

  • together

  • don't know

Explicação

Questão 86 de 187

1

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

Selecione uma das seguintes:

  • has

  • is

  • can

  • are

  • include

Explicação

Questão 87 de 187

1

How to remove item from LinkedList

Selecione uma das seguintes:

  • 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

Explicação

Questão 88 de 187

1

___testing focuses on testing the functional characteristics of a module

Selecione uma das seguintes:

  • Green-box

  • Terminal

  • White-box

  • Black-box

Explicação

Questão 89 de 187

1

Ideal data structure for a contact list is ?

Selecione uma das seguintes:

  • tree

  • map

  • graph

  • set

  • vector

Explicação

Questão 90 de 187

1

___testing requires the use of test data that exercise each statement in a module

Selecione uma das seguintes:

  • White-box

  • Black-box

  • Terminal

  • Green-box

Explicação

Questão 91 de 187

1

What is attribute of CircularList

Selecione uma das seguintes:

  • next of last item referencing to the first item

  • set of Nubmber

  • Rules

  • last of next item referencing to the last item

Explicação

Questão 92 de 187

1

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

Selecione uma das seguintes:

  • iterator

  • accessor

  • traversal

  • preorder

Explicação

Questão 93 de 187

1

What is popularity used to traverse SingleLinkedList

Selecione uma das seguintes:

  • Interface

  • Iterator

  • Traversator

  • Loop and switch

  • Commutator

Explicação

Questão 94 de 187

1

Which of the following in Java is very similar to “contract”?

Selecione uma das seguintes:

  • next of last item referencing to the first item

  • Interface implementation

  • Inheritance

  • Access denied

Explicação

Questão 95 de 187

1

The java linked-list class uses a ___ to implement the list interface

Selecione uma das seguintes:

  • array-linked list

  • array list

  • linked list

  • double-linked list

Explicação

Questão 96 de 187

1

List iterator and iterator is the same thing in JAVA

Selecione uma das opções:

  • VERDADEIRO
  • FALSO

Explicação

Questão 97 de 187

1

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

Selecione uma das seguintes:

  • yes

  • no

  • maybe

Explicação

Questão 98 de 187

1

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

Selecione uma das seguintes:

  • Previous()

  • Last()

  • Next()

  • This()

Explicação

Questão 99 de 187

1

Can we access the element of a set by index?

Selecione uma das seguintes:

  • no

  • yes

Explicação

Questão 100 de 187

1

What relationship class Node and LinkedList have?

Selecione uma das seguintes:

  • has-a

  • has

  • is

  • is-a

Explicação

Questão 101 de 187

1

A listIterator allows us to access the elements

Selecione uma das seguintes:

  • both forward and backward

  • backward

  • neither forward nor backward

  • forward

Explicação

Questão 102 de 187

1

Which of them is NOT an example of Data Structure ?

Selecione uma das seguintes:

  • Breadth First Search

  • Search

  • Search1

Explicação

Questão 103 de 187

1

A queue is a ___-in ___-out data structure

Selecione uma das seguintes:

  • first, first

  • first, last

  • last, first

  • last, last

Explicação

Questão 104 de 187

1

Operating system use ___ to determine which print job should be handled next

Selecione uma das seguintes:

  • queue

  • stack

  • order

  • depth

Explicação

Questão 105 de 187

1

Two JAVA API implementation of Set and Map are:

Selecione uma das seguintes:

  • tree anf hash

  • tree and list

  • vector

  • arrayList

Explicação

Questão 106 de 187

1

int xxx(int x){

if(n==1)return 1;
return x*xxx(x-1);
}

Selecione uma das seguintes:

  • n!

  • log(n)

  • fibonacci

  • 2^n

Explicação

Questão 107 de 187

1

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

Selecione uma das seguintes:

  • graph

  • tree

  • hash

  • vector

Explicação

Questão 108 de 187

1

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

Selecione uma das seguintes:

  • fibonacci

  • n!

  • trash in function

  • logn

Explicação

Questão 109 de 187

1

Explain how interface is like a contract

Selecione uma das seguintes:

  • 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

Explicação

Questão 110 de 187

1

Node of a graph is called?

Selecione uma das seguintes:

  • vertex

  • edge

  • root

Explicação

Questão 111 de 187

1

What is the time complexity of recursive Binary Search algorithm?

Selecione uma das seguintes:

  • O(logn)

  • O(n)

  • O(1)

  • O(2^n)

Explicação

Questão 112 de 187

1

Recursive implementation works faster than lopped one

Selecione uma das opções:

  • VERDADEIRO
  • FALSO

Explicação

Questão 113 de 187

1

It's possible to implement all recursive algorithms without

Selecione uma das opções:

  • VERDADEIRO
  • FALSO

Explicação

Questão 114 de 187

1

Recursive solutions are more beautiful and easy to understands

Selecione uma das opções:

  • VERDADEIRO
  • FALSO

Explicação

Questão 115 de 187

1

Set of connections between vertices of a graph is called?

Selecione uma das seguintes:

  • edge

  • vertex

  • path

  • root

Explicação

Questão 116 de 187

1

What are two important differences between abstract class and actual class? What are the
similarities?

Selecione uma das seguintes:

  • 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

Explicação

Questão 117 de 187

1

Quicksort is implemented recursively

Selecione uma das opções:

  • VERDADEIRO
  • FALSO

Explicação

Questão 118 de 187

1

List four subclasses of RuntimeException: IndexOutOfBounds, Arithmetic, IlegalArgument,

Selecione uma das seguintes:

  • OutputMismatch

  • InputMismatch

  • Logarithmic

  • LegalArgument

  • IllegalMismatch

Explicação

Questão 119 de 187

1

What the time complexity of LinearSearch algorithm?

Selecione uma das seguintes:

  • O(n)

  • O(1)

  • O(logn)

  • O(nlogn)

Explicação

Questão 120 de 187

1

Graph where each edge has a direction is called?

Selecione uma das seguintes:

  • directed

  • symmetric

  • unconnected

Explicação

Questão 121 de 187

1

How protected visibility can be equivalent to public?

Selecione uma das seguintes:

  • 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.

Explicação

Questão 122 de 187

1

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

Selecione uma das seguintes:

  • Linear Search

  • Binary Search

  • Huffman tree

  • Full binary search

Explicação

Questão 123 de 187

1

Adjacent matrix representing undirected graph should be?

Selecione uma das seguintes:

  • symmetric

  • assymmetric

  • connected

Explicação

Questão 124 de 187

1

Explain why Shape can not be an actual class

Selecione uma das seguintes:

  • Because it has abstract methods

  • Because it has actual methods

  • Because it has not abstract methods

  • Because it has not actual methods

Explicação

Questão 125 de 187

1

To use Binary Search items should be ...

Selecione uma das seguintes:

  • ordered

  • traversed

  • matched

  • divorced

Explicação

Questão 126 de 187

1

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

Selecione uma das seguintes:

  • adjacent

  • subling

  • brotherhood

  • BFS

Explicação

Questão 127 de 187

1

Overriding

Selecione uma das seguintes:

  • 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.

Explicação

Questão 128 de 187

1

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

Selecione uma das seguintes:

  • path

  • cycle

  • route

  • weight

Explicação

Questão 129 de 187

1

Overloading

Selecione uma das seguintes:

  • 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.

Explicação

Questão 130 de 187

1

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

Selecione uma das seguintes:

  • cycle

  • trip

  • mapped

  • looped

Explicação

Questão 131 de 187

1

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

Selecione uma das seguintes:

  • leaf

  • subtree

  • siding

  • full

Explicação

Questão 132 de 187

1

Describe the use of the keywords super. and super(...)?

Selecione uma das seguintes:

  • 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.

Explicação

Questão 133 de 187

1

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

Selecione uma das seguintes:

  • unconnected

  • connected

Explicação

Questão 134 de 187

1

A _______ of a node is a tree whose root is a child of that node

Selecione uma das seguintes:

  • parent

  • subtree

  • leaf

  • root

  • child

Explicação

Questão 135 de 187

1

What can you say about class Object?

Selecione uma das seguintes:

  • 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.

Explicação

Questão 136 de 187

1

Indicate two ways of graph implementations

Selecione uma das seguintes:

  • list and matrix

  • hash and list

  • ArrauList and vector

  • Tree and map

Explicação

Questão 137 de 187

1

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

Selecione uma das seguintes:

  • dense

  • sparse

  • cute

  • bad

Explicação

Questão 138 de 187

1

Describe the difference between is - a and has - a relationships?

Selecione uma das seguintes:

  • 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.

Explicação

Questão 139 de 187

1

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

Selecione uma das seguintes:

  • sparse

  • dense

  • i don`t know

  • go home and cry

Explicação

Questão 140 de 187

1

What is the advantage of specifying an abstract data type as an interface instead of just going ahead and implementing it as a class?

Selecione uma das seguintes:

  • 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

Explicação

Questão 141 de 187

1

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

Selecione uma das seguintes:

  • list

  • tree

  • map

  • graph

Explicação

Questão 142 de 187

1

The ______ of a node is a measure of its distance from the root

Selecione uma das seguintes:

  • level

  • distance

  • parent

  • root

  • sibling

Explicação

Questão 143 de 187

1

Which of the graph implementations is more simple?

Selecione uma das seguintes:

  • matrix

  • list

  • tree

Explicação

Questão 144 de 187

1

What are two different uses of a term interface in programming

Selecione uma das seguintes:

  • 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).

Explicação

Questão 145 de 187

1

Why do we need BFS and DFS algorithms?

Selecione uma das seguintes:

  • to have fun

  • to traverse a graph

  • be aware of collision

Explicação

Questão 146 de 187

1

Distance from the root to its deepest leaf is knows as ______ of a tree?

Selecione uma das seguintes:

  • height

  • root

  • path

  • subtree

  • depth

Explicação

Questão 147 de 187

1

What do abstract methods and interfaces have in common? How do they differ?

Selecione uma das seguintes:

  • 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.

Explicação

Questão 148 de 187

1

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

Selecione uma das seguintes:

  • BFS

  • DFS

Explicação

Questão 149 de 187

1

List two subclasses of IOException:

Selecione uma das seguintes:

  • EOFException, FileFoundException

  • EOFException, FileNotFoundException

  • SQLException, FileNotFoundException

  • EOFException, SQLException

Explicação

Questão 150 de 187

1

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

Selecione uma das seguintes:

  • BFS

  • DFS

Explicação

Questão 151 de 187

1

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

Selecione uma das seguintes:

  • BFS

  • DFS

Explicação

Questão 152 de 187

1

Explain why Shape can not be an interface

Selecione uma das seguintes:

  • 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

Explicação

Questão 153 de 187

1

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

Selecione uma das seguintes:

  • connected

  • full

  • directed

Explicação

Questão 154 de 187

1

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

Selecione uma das seguintes:

  • directed

  • connected

Explicação

Questão 155 de 187

1

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

Selecione uma das seguintes:

  • Binary Tree

  • Unary Tree

  • Huffman Tree

  • General Tree

Explicação

Questão 156 de 187

1

Structured set of data is called _______.

Selecione uma das seguintes:

  • data structure

  • algorithm

Explicação

Questão 157 de 187

1

What does encapsulation mean, and how it is used in JAVA?

Selecione uma das seguintes:

  • 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.

Explicação

Questão 158 de 187

1

An ordered set of instructions is called.

Selecione uma das seguintes:

  • algorithm

  • model

  • data

Explicação

Questão 159 de 187

1

What is the benefit of encoding letters trough Huffman tree

Selecione uma das seguintes:

  • earning space

  • it is smart

  • just for fun

  • more beautiful

  • it is simple

Explicação

Questão 160 de 187

1

Describe the use of the keywords this. and this (...)?

Selecione uma das seguintes:

  • 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.

Explicação

Questão 161 de 187

1

Explain the relationship between classes Number, Integer and Short.

Selecione uma das seguintes:

  • 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.

Explicação

Questão 162 de 187

1

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

Selecione uma das seguintes:

  • Binary

  • Huffman Tree

  • DFS

  • Breadth first search

Explicação

Questão 163 de 187

1

Search a binary search tree costs?

Selecione uma das seguintes:

  • O(logn)

  • O(nlogn)

  • O(1)

  • O(n)

Explicação

Questão 164 de 187

1

The four kinds of visibility in order of decreasing visibility are:

Selecione uma das seguintes:

  • Public, package, protected, private

  • Private, protected, package, public

  • Package, private, public, protected

  • Protected, package, private, public

  • Private, public, protected, package

Explicação

Questão 165 de 187

1

What is default package visibility?

Selecione uma das seguintes:

  • 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.

Explicação

Questão 166 de 187

1

Form of method determined by its name and arguments

Selecione uma das seguintes:

  • Java method

  • Signature method

  • Get method

  • Data method

  • Set method

Explicação

Questão 167 de 187

1

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

Selecione uma das seguintes:

  • full binary tree

  • general tree

  • unary tree

  • perfect tree

  • binary tree

Explicação

Questão 168 de 187

1

An____ specifies the requirements of an ADT as a contract between the____ and ____; A ____ implements the ADT

Selecione uma das seguintes:

  • interface, user, developer, method

  • implemetation, developer, user, class

  • interface, developer, user,class

  • implemetation, user, developer, class

  • implemetation, developer, user, method

Explicação

Questão 169 de 187

1

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

Selecione uma das seguintes:

  • inorder

  • preorder

  • postorder

Explicação

Questão 170 de 187

1

An interface can be implemented by multiple classes -

Selecione uma das seguintes:

  • true

  • false

Explicação

Questão 171 de 187

1

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

Selecione uma das seguintes:

  • preorder

  • inorder

  • postorder

Explicação

Questão 172 de 187

1

traverse left subtree visit root node traversal is called?

Selecione uma das seguintes:

  • inorder

  • postorder

  • preorder

Explicação

Questão 173 de 187

1

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

Selecione uma das seguintes:

  • isLeaf()

  • isEmpty()

  • noMore()

  • isLast()

  • goHome()

Explicação

Questão 174 de 187

1

Element insertion to a Binary Search tree costs?

Selecione uma das seguintes:

  • O(logn)

  • O(1)

  • O(n)

  • O(nlogn)

Explicação

Questão 175 de 187

1

Does binary search tree contain duplicates?

Selecione uma das seguintes:

  • no

  • yes

  • go home

  • maybe

Explicação

Questão 176 de 187

1

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

Selecione uma das seguintes:

  • maxheap

  • minheap

  • hiphop

  • treeheap

Explicação

Questão 177 de 187

1

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

Selecione uma das seguintes:

  • minheap

  • maxheap

  • hiphop

  • fullheap

  • treeheap

Explicação

Questão 178 de 187

1

Insert and remove items from a heap costs?

Selecione uma das seguintes:

  • O(1)

  • O(n)

  • O(nlogn)

  • O(nxn)

Explicação

Questão 179 de 187

1

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

Selecione uma das seguintes:

  • heap

  • deap

  • DFS

  • DBS

Explicação

Questão 180 de 187

1

A ________ tree is a binary tree used to store a code that facilitates the compression

Selecione uma das seguintes:

  • heap

  • Huffman

  • Dijkstra

  • DFS

  • DBS

Explicação

Questão 181 de 187

1

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

Selecione uma das seguintes:

  • graph

  • treeMap

  • treeSet

  • vector

  • tree

Explicação

Questão 182 de 187

1

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

Selecione uma das seguintes:

  • tree

  • vector

  • graph

  • arrayList

  • linkedList

Explicação

Questão 183 de 187

1

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

Selecione uma das seguintes:

  • longest

  • easiest

  • shortest

  • binary

  • deepest

Explicação

Questão 184 de 187

1

Which of the following is recursive algorithm?

Selecione uma das seguintes:

  • QuickSort

  • Insertionsort

  • Selectionsort

  • BUBBLESORT

Explicação

Questão 185 de 187

1

Average time complexity of Selection sort is?

Selecione uma das seguintes:

  • O(n^2)

  • O(n^3)

  • O(n^2,25)

  • O(n)

Explicação

Questão 186 de 187

1

Average time complexity of Heap sort is?

Selecione uma das seguintes:

  • O(logn)

  • O(nlogn)

  • O(n)

  • O(1)

Explicação

Questão 187 de 187

1

Average time complexity of Quick sort is?

Selecione uma das seguintes:

  • O(nlogn)

  • O(logn)

  • O(n)

  • O(1)

Explicação