sdp4

Descrição

Quiz sobre sdp4, criado por 1610 R em 24-05-2018.
1610 R
Quiz por 1610 R, atualizado more than 1 year ago
1610 R
Criado por 1610 R quase 6 anos atrás
345
1

Resumo de Recurso

Questão 1

Questão
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.
Responda
  • quick
  • merge
  • bubble
  • heap

Questão 2

Questão
Inventor of merge sort is ?
Responda
  • John von Neumann
  • Mr Merge
  • John Lennon
  • Professor Sortmerg

Questão 3

Questão
А collision occurs when ... ?
Responda
  • 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

Questão 4

Questão
What are the two parts of ADT?
Responda
  • private, public
  • methods and data fields
  • Parent and Child
  • Int and Float
  • Queue and Stack

Questão 5

Questão
List two ways of organizing hashtable.
Responda
  • open addressing and chaining
  • key and value
  • arraylist and vector
  • Breadth first search and Depth first search

Questão 6

Questão
Which of them has more methods?
Responda
  • Subclass
  • Superclass
  • Parentclass
  • Object

Questão 7

Questão
Indicate the relationship of HastableOpen and Entry classes?
Responda
  • has-a
  • static
  • is-b
  • is-a

Questão 8

Questão
The relationship when one class is defined inside the definition of another ?
Responda
  • has-a
  • is
  • is-a

Questão 9

Questão
Which of them is NOT an example of Data Structure ?
Responda
  • ArrayList
  • Breadth First Search
  • Set
  • Priority Queue
  • Graph

Questão 10

Questão
Redefinition of method of superclass in a subclass with the same name and number of parameters?
Responda
  • Override
  • Overload
  • Public
  • Encapsulation

Questão 11

Questão
A set view of a map can be obtained through method_______?
Responda
  • entrySet
  • setView
  • goAhead
  • emptySet

Questão 12

Questão
Which of them is NOT feature of collection interface ?
Responda
  • Graph
  • List
  • Queue
  • Vector
  • Set

Questão 13

Questão
Redefinition of method with the same name but different number of parameters?
Responda
  • Overload
  • Override
  • Encapsulation
  • Polymorphism

Questão 14

Questão
If you want to call the constructor of superclass you would use
Responda
  • Super()
  • Parent()
  • that()

Questão 15

Questão
Quadratic probing is usually used to ?
Responda
  • reduce collisions
  • reallocate array
  • for fun
  • enlarge table size

Questão 16

Questão
This returns TRUE if the collection contains object
Responda
  • Find(obj)
  • goTo(obj)
  • indexF(obj)
  • contains(obj)
  • indexOf(obj)

Questão 17

Questão
If you want to call different constructor of current class you would use
Responda
  • this()
  • that()
  • anay()
  • which()

Questão 18

Questão
Elements of a List are accessed by means of an
Responda
  • index
  • position
  • book
  • loop
  • switch

Questão 19

Questão
Set of ordered pairs whose element are known as the key and value is ?
Responda
  • set
  • map
  • graph
  • array

Questão 20

Questão
If there is at least one abstract method in a class, that class is called
Responda
  • Abstract class
  • Child class
  • Parent class
  • Not given

Questão 21

Questão
If there are no abstract methods in the class we call that class…
Responda
  • Actual class
  • Abstract class
  • Parent
  • Superclass

Questão 22

Questão
A list can ___ or ___ as items(elements) are added or removed
Responda
  • flow, shrink
  • grow, shrink
  • decrease, think
  • fly, sit
  • increase, grow

Questão 23

Questão
Is it possible to inherit from multiple classes ?
Responda
  • No
  • Yes

Questão 24

Questão
Is it possible to implement multiple interfaces?
Responda
  • no
  • yes

Questão 25

Questão
The Collection is a _____ of a List ?
Responda
  • superinterface
  • father
  • node
  • parent
  • interface

Questão 26

Questão
Every class has _____as a superclass
Responda
  • Object(parent of classes)
  • Object(childof classes)
  • Superclass
  • int

Questão 27

Questão
Which method returns an object at the top of a Stack in JAVA?
Responda
  • top()
  • pop()
  • front()
  • peek()
  • poll()

Questão 28

Questão
InstanceOf used to test
Responda
  • Whether an object belongs to class or not
  • Division by zero may occur
  • class belongs to object

Questão 29

Questão
Which method adds an item on the top of a Stack in JAVA?
Responda
  • add()
  • top()
  • peek()
  • push()
  • bush()

Questão 30

Questão
Two JAVA API Implementation of Set and Map are
Responda
  • tree and hash
  • graph and vector
  • list and hash
  • tree and list

Questão 31

Questão
What is not perfect in this code: ave = sum/count;
Responda
  • Division by zero may occur
  • Division by one may occur
  • nothing
  • not given

Questão 32

Questão
First in last out structure is...
Responda
  • Tree
  • Graph
  • Set
  • Queue
  • Stack

Questão 33

Questão
Attempt to convert a string that is not numeric to a number faults …
Responda
  • NumberFormatException
  • ArrayIndexOutOfBoundsException
  • DivisionByZero

Questão 34

Questão
Which structure is widely used in finding palindrome problem?
Responda
  • Map
  • Stack
  • Graph
  • Queue
  • Set

Questão 35

Questão
Average time complexity of Insertion sort is?
Responda
  • O(n^2)
  • O(1)
  • O(nlogn)
  • O(logn)
  • O(n)

Questão 36

Questão
Attempt to access array element using index less than zero folds
Responda
  • ArrayIndexOutOfBoundsException
  • NumberFormatException
  • OutOfBoundsException

Questão 37

Questão
Which container is not appropriate to implement Stack in JAVA?
Responda
  • Array
  • Graph
  • List
  • Vector

Questão 38

Questão
________ exception is an error normally due to programmer
Responda
  • unchecked
  • checked
  • not given
  • null

Questão 39

Questão
Which structure is widely used to calculate the value of postfix expression?
Responda
  • String
  • Array
  • Set
  • Stack
  • Queue

Questão 40

Questão
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.
Responda
  • O(1)
  • O(n)
  • O(n^2)
  • O(nlogn)
  • O(logn)

Questão 41

Questão
________ exception is an error normally not due to programmer
Responda
  • unchecked
  • checked
  • null
  • not given

Questão 42

Questão
Calculate value of "4 7 * 20 - "
Responda
  • 1
  • 3
  • 136
  • 8
  • 144

Questão 43

Questão
ADT that enables a user to access information (data) corresponding to a specified key.
Responda
  • Map
  • Queue
  • Set
  • Graph

Questão 44

Questão
Ability of object of one class to act like it is an object of another class is?
Responda
  • Inheritance
  • Polymorphism
  • Encapsulation
  • Java code
  • SLOC (Source Line of Code)

Questão 45

Questão
What does method empty return for empty stack?
Responda
  • nothing
  • empty
  • hello
  • true
  • false

Questão 46

Questão
Which of the following is not example of visibility in Java ?
Responda
  • Eclipse
  • JetBrains
  • NetBeans

Questão 47

Questão
Waiting line of people is similar to which data structure?
Responda
  • Graph
  • Stack
  • Queue
  • Tree
  • LinkedList

Questão 48

Questão
Sets the element on position Index to reference entry
Responda
  • Set (Index, Entry )
  • GEt(Index, Entry)
  • Nothing
  • Set(Entry)

Questão 49

Questão
Average time complexity of Merge sort is?
Responda
  • O(nlogn)
  • O(1)
  • O(logn)
  • O(n)
  • O(n^2)

Questão 50

Questão
You can reference an object of a ___ type through a variable of a ___ type
Responda
  • subclass, superclass
  • superclass, subclass
  • subclass, parent class
  • interface, subclass

Questão 51

Questão
Most sorting algorithm are divided into two basic groups.
Responda
  • fast and slow
  • go amd play
  • sort and search
  • ordered and unordered

Questão 52

Questão
What is the time complexity of insert(index) method in ArrayList
Responda
  • O(n)
  • O(n^2)
  • O(1)
  • O(n^3)

Questão 53

Questão
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 –___ :
Responda
  • subclass, superclass, subclass, downcast
  • superclass, subclass, subclass, downcast
  • subclass, subclass, superclass, downcast
  • subclass, subclass, downcast, superclass

Questão 54

Questão
Which structure is better to use when printing many documents from multiple computers at one printer?
Responda
  • Set
  • Queue
  • Graph
  • Stack
  • Tree

Questão 55

Questão
What is the difference between ArrayList and Vector?
Responda
  • Vector is synchronized, where ArrayList is not
  • there are same
  • ArrayLIst is synchronized, where Vectoris not

Questão 56

Questão
JAVA API uses ____________ to implement both Set and Map interfaces.
Responda
  • hash table
  • tree table
  • vector
  • graph
  • ArrayList

Questão 57

Questão
If we call remove() function for the queue, which item will be removed
Responda
  • third
  • second
  • middle
  • first
  • last

Questão 58

Questão
Each node is a single-linked list, has a reference to__ and __
Responda
  • next node, previous node
  • next node, data
  • data, next node
  • implement, next node

Questão 59

Questão
For(int i=0; i<size; i++){ If(theData[i]==entry){ Return i; }Return -1;} This method is similar to which method of ArrayList
Responda
  • IndexOf(entry)
  • number
  • IndexOf(cell)
  • not given

Questão 60

Questão
What function return first added item in the queue?
Responda
  • giveMeFirst()
  • front()
  • first()
  • goBack()
  • element()

Questão 61

Questão
Indicate constant time complexity in terms of Big-O notation
Responda
  • O(1)
  • O(n)
  • O(n^2)
  • O(n^3)

Questão 62

Questão
This method associates specified value with the specified key in the map.
Responda
  • put(key,value)
  • set(key,value)
  • get(key,value)
  • key.set(key,value)

Questão 63

Questão
Which function is used to add new item in the queue?
Responda
  • add()
  • suffer()
  • remove()
  • offer()
  • poll()

Questão 64

Questão
The collection of abstract methods is called
Responda
  • Interface
  • Polymorphism
  • Super()
  • Tree

Questão 65

Questão
Indicate logarithm time complexity in terms of big-O notation?
Responda
  • log(n)
  • log(1)
  • log(n^2)
  • log(n^3)

Questão 66

Questão
Average time complexity of Shell sort is?
Responda
  • O(n^1.25)
  • O(n)
  • O(n^2)
  • O(nlogn)
  • O(1)

Questão 67

Questão
Indicate linear time complexity in terms of big-O notation?
Responda
  • n
  • logn
  • n^2
  • n^3

Questão 68

Questão
Indicate exponential time complexity in terms of big-O notation?
Responda
  • O(2^n)
  • O(3^n)
  • O(1)
  • O(n)

Questão 69

Questão
What determines whether you should use quadratic sort or a logarithmic sort algorithm?
Responda
  • array size
  • array indexes
  • array type
  • array values
  • swapping conditions

Questão 70

Questão
Find the slowest time
Responda
  • O(n!)
  • O(1)
  • O(logn)
  • O(n^2)

Questão 71

Questão
What is the time complexity of ArrayList remove(index) method
Responda
  • O(n)
  • O(1)
  • O(n^2)
  • O(n^3)

Questão 72

Questão
In a double-linked list, each node has a reference to: ___, ___and ___
Responda
  • next node, previous node, data
  • implement, data, next node
  • next node, data, previous node
  • data, next node previous node

Questão 73

Questão
In open addressing you can not remove an item to be deleted, so what should you do instead?
Responda
  • mark as deleted flag
  • do nothing
  • delete and save in temporary list
  • change its palce with another item

Questão 74

Questão
What is the time complexity of adding an item in front of a LinkedList
Responda
  • O(1)
  • O(n)
  • O(n!)
  • O(logn)

Questão 75

Questão
Average time complexity of Bubble sort is?
Responda
  • O(n^2)
  • O(nlogn)
  • O(1)
  • O(n)
  • O(logn)

Questão 76

Questão
What is the time complexity of insert(index) method in ArrayList?
Responda
  • O(n^2)
  • O(n)
  • O(1)
  • O(mxn)
  • O(logn)

Questão 77

Questão
To remove an item from a single -linked list, you need a reference to
Responda
  • previous node
  • next node
  • data
  • the node

Questão 78

Questão
What is the time complexity of adding element in the beginning of ArrayList
Responda
  • O(n)
  • O(n!)
  • O(1)
  • O(logn)

Questão 79

Questão
If two or more keys will be encoded to the same index of a hashtable, it is called.
Responda
  • collision
  • error
  • mistake
  • duplicate

Questão 80

Questão
Which method removes an item on the top of a Stack in JAVA?
Responda
  • peek()
  • pop()
  • hop()
  • remove()
  • drop()

Questão 81

Questão
To remove an item from a double -linked list, you need a reference to
Responda
  • data
  • node
  • next
  • previous node

Questão 82

Questão
Which method searches for target and returns its position in LinkedList
Responda
  • IndexOf(target)
  • IndexOf(cell)
  • Not given
  • ArrayIndexOutOfBloundException

Questão 83

Questão
Inheritance is:
Responda
  • 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

Questão 84

Questão
Hiding access to data members of a class is called:
Responda
  • Polymorphism
  • Encapsulation
  • Inheritence
  • None of them

Questão 85

Questão
An iterator allows us to access items of a list
Responda
  • sequentially
  • ordinal
  • together
  • don't know

Questão 86

Questão
The relationship when one class is a subclass of another is called:
Responda
  • has
  • is
  • can
  • are
  • include

Questão 87

Questão
How to remove item from LinkedList
Responda
  • 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

Questão 88

Questão
___testing focuses on testing the functional characteristics of a module
Responda
  • Green-box
  • Terminal
  • White-box
  • Black-box

Questão 89

Questão
Ideal data structure for a contact list is ?
Responda
  • tree
  • map
  • graph
  • set
  • vector

Questão 90

Questão
___testing requires the use of test data that exercise each statement in a module
Responda
  • White-box
  • Black-box
  • Terminal
  • Green-box

Questão 91

Questão
What is attribute of CircularList
Responda
  • next of last item referencing to the first item
  • set of Nubmber
  • Rules
  • last of next item referencing to the last item

Questão 92

Questão
You apply method ____________ to set view to get an object that facilitates sequential access to the Map elements.
Responda
  • iterator
  • accessor
  • traversal
  • preorder

Questão 93

Questão
What is popularity used to traverse SingleLinkedList
Responda
  • Interface
  • Iterator
  • Traversator
  • Loop and switch
  • Commutator

Questão 94

Questão
Which of the following in Java is very similar to “contract”?
Responda
  • next of last item referencing to the first item
  • Interface implementation
  • Inheritance
  • Access denied

Questão 95

Questão
The java linked-list class uses a ___ to implement the list interface
Responda
  • array-linked list
  • array list
  • linked list
  • double-linked list

Questão 96

Questão
List iterator and iterator is the same thing in JAVA
Responda
  • True
  • False

Questão 97

Questão
Is it possible to traverse containing of a list this way? for(int nextInt : aList){… }
Responda
  • yes
  • no
  • maybe

Questão 98

Questão
Show the method which exists in a DoubleLinkedList and not exist in a SingleLinkedList
Responda
  • Previous()
  • Last()
  • Next()
  • This()

Questão 99

Questão
Can we access the element of a set by index?
Responda
  • no
  • yes

Questão 100

Questão
What relationship class Node and LinkedList have?
Responda
  • has-a
  • has
  • is
  • is-a

Questão 101

Questão
A listIterator allows us to access the elements
Responda
  • both forward and backward
  • backward
  • neither forward nor backward
  • forward

Questão 102

Questão
Which of them is NOT an example of Data Structure ?
Responda
  • Breadth First Search
  • Search
  • Search1

Questão 103

Questão
A queue is a ___-in ___-out data structure
Responda
  • first, first
  • first, last
  • last, first
  • last, last

Questão 104

Questão
Operating system use ___ to determine which print job should be handled next
Responda
  • queue
  • stack
  • order
  • depth

Questão 105

Questão
Two JAVA API implementation of Set and Map are:
Responda
  • tree anf hash
  • tree and list
  • vector
  • arrayList

Questão 106

Questão
int xxx(int x){ if(n==1)return 1; return x*xxx(x-1); }
Responda
  • n!
  • log(n)
  • fibonacci
  • 2^n

Questão 107

Questão
.Data structure similar to tree but it doesn't have limitation according to number of parents is?
Responda
  • graph
  • tree
  • hash
  • vector

Questão 108

Questão
int xxx(int x, int y, int z){ if(z==1){return 1;} return xxx(x+y,x,z-1); }
Responda
  • fibonacci
  • n!
  • trash in function
  • logn

Questão 109

Questão
Explain how interface is like a contract
Responda
  • 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

Questão 110

Questão
Node of a graph is called?
Responda
  • vertex
  • edge
  • root

Questão 111

Questão
What is the time complexity of recursive Binary Search algorithm?
Responda
  • O(logn)
  • O(n)
  • O(1)
  • O(2^n)

Questão 112

Questão
Recursive implementation works faster than lopped one
Responda
  • True
  • False

Questão 113

Questão
It's possible to implement all recursive algorithms without
Responda
  • True
  • False

Questão 114

Questão
Recursive solutions are more beautiful and easy to understands
Responda
  • True
  • False

Questão 115

Questão
Set of connections between vertices of a graph is called?
Responda
  • edge
  • vertex
  • path
  • root

Questão 116

Questão
What are two important differences between abstract class and actual class? What are the similarities?
Responda
  • 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

Questão 117

Questão
Quicksort is implemented recursively
Responda
  • True
  • False

Questão 118

Questão
List four subclasses of RuntimeException: IndexOutOfBounds, Arithmetic, IlegalArgument,
Responda
  • OutputMismatch
  • InputMismatch
  • Logarithmic
  • LegalArgument
  • IllegalMismatch

Questão 119

Questão
What the time complexity of LinearSearch algorithm?
Responda
  • O(n)
  • O(1)
  • O(logn)
  • O(nlogn)

Questão 120

Questão
Graph where each edge has a direction is called?
Responda
  • directed
  • symmetric
  • unconnected

Questão 121

Questão
How protected visibility can be equivalent to public?
Responda
  • 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.

Questão 122

Questão
for(i<n) if(a[i] == item) return i; This algorithm is similar to ...
Responda
  • Linear Search
  • Binary Search
  • Huffman tree
  • Full binary search

Questão 123

Questão
Adjacent matrix representing undirected graph should be?
Responda
  • symmetric
  • assymmetric
  • connected

Questão 124

Questão
Explain why Shape can not be an actual class
Responda
  • Because it has abstract methods
  • Because it has actual methods
  • Because it has not abstract methods
  • Because it has not actual methods

Questão 125

Questão
To use Binary Search items should be ...
Responda
  • ordered
  • traversed
  • matched
  • divorced

Questão 126

Questão
Vertex is ________ to another vertex if there is an edge connecting them
Responda
  • adjacent
  • subling
  • brotherhood
  • BFS

Questão 127

Questão
Overriding
Responda
  • 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.

Questão 128

Questão
.A __________ is a sequence of vertices in which each successive vertex is connected to its predecessor. (Graphs)
Responda
  • path
  • cycle
  • route
  • weight

Questão 129

Questão
Overloading
Responda
  • 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.

Questão 130

Questão
A ___________ path is a simple path in which only the first and last items are the same.
Responda
  • cycle
  • trip
  • mapped
  • looped

Questão 131

Questão
The node of a tree without children is called ...?
Responda
  • leaf
  • subtree
  • siding
  • full

Questão 132

Questão
Describe the use of the keywords super. and super(...)?
Responda
  • 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.

Questão 133

Questão
.If there is no path path from vertex to any other vertex that graph is considered to be ?
Responda
  • unconnected
  • connected

Questão 134

Questão
A _______ of a node is a tree whose root is a child of that node
Responda
  • parent
  • subtree
  • leaf
  • root
  • child

Questão 135

Questão
What can you say about class Object?
Responda
  • 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.

Questão 136

Questão
Indicate two ways of graph implementations
Responda
  • list and matrix
  • hash and list
  • ArrauList and vector
  • Tree and map

Questão 137

Questão
.A __________ graph is one in which [E] is close to but less than [V]^2.
Responda
  • dense
  • sparse
  • cute
  • bad

Questão 138

Questão
Describe the difference between is - a and has - a relationships?
Responda
  • 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.

Questão 139

Questão
A ________ graph is one where [E] is much less than [V]^2.
Responda
  • sparse
  • dense
  • i don`t know
  • go home and cry

Questão 140

Questão
What is the advantage of specifying an abstract data type as an interface instead of just going ahead and implementing it as a class?
Responda
  • 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

Questão 141

Questão
Which of the graph implementation is more efficient in terms of memory usage?
Responda
  • list
  • tree
  • map
  • graph

Questão 142

Questão
The ______ of a node is a measure of its distance from the root
Responda
  • level
  • distance
  • parent
  • root
  • sibling

Questão 143

Questão
Which of the graph implementations is more simple?
Responda
  • matrix
  • list
  • tree

Questão 144

Questão
What are two different uses of a term interface in programming
Responda
  • 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).

Questão 145

Questão
Why do we need BFS and DFS algorithms?
Responda
  • to have fun
  • to traverse a graph
  • be aware of collision

Questão 146

Questão
Distance from the root to its deepest leaf is knows as ______ of a tree?
Responda
  • height
  • root
  • path
  • subtree
  • depth

Questão 147

Questão
What do abstract methods and interfaces have in common? How do they differ?
Responda
  • 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.

Questão 148

Questão
Traversing graph visiting a start node first, then all nodes that are adjacent to it next.
Responda
  • BFS
  • DFS

Questão 149

Questão
List two subclasses of IOException:
Responda
  • EOFException, FileFoundException
  • EOFException, FileNotFoundException
  • SQLException, FileNotFoundException
  • EOFException, SQLException

Questão 150

Questão
Traversing graph visiting a start node first, then choose one node that is adjacent to it next.
Responda
  • BFS
  • DFS

Questão 151

Questão
Dijkstra's algorithm use ______ algorithm to traverse all nodes.
Responda
  • BFS
  • DFS

Questão 152

Questão
Explain why Shape can not be an interface
Responda
  • 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

Questão 153

Questão
Graph is considered to be ___________ if there is a path from each vertex to any other vertex.
Responda
  • connected
  • full
  • directed

Questão 154

Questão
.In ___________ graph is {v, u} is edge then {u, v} is not necessary an edge
Responda
  • directed
  • connected

Questão 155

Questão
Tree where every item must have at most 2 children is called?
Responda
  • Binary Tree
  • Unary Tree
  • Huffman Tree
  • General Tree

Questão 156

Questão
Structured set of data is called _______.
Responda
  • data structure
  • algorithm

Questão 157

Questão
What does encapsulation mean, and how it is used in JAVA?
Responda
  • 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.

Questão 158

Questão
An ordered set of instructions is called.
Responda
  • algorithm
  • model
  • data

Questão 159

Questão
What is the benefit of encoding letters trough Huffman tree
Responda
  • earning space
  • it is smart
  • just for fun
  • more beautiful
  • it is simple

Questão 160

Questão
Describe the use of the keywords this. and this (...)?
Responda
  • 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.

Questão 161

Questão
Explain the relationship between classes Number, Integer and Short.
Responda
  • 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.

Questão 162

Questão
A tree where left child is less and right child is more than its parent called?
Responda
  • Binary
  • Huffman Tree
  • DFS
  • Breadth first search

Questão 163

Questão
Search a binary search tree costs?
Responda
  • O(logn)
  • O(nlogn)
  • O(1)
  • O(n)

Questão 164

Questão
The four kinds of visibility in order of decreasing visibility are:
Responda
  • Public, package, protected, private
  • Private, protected, package, public
  • Package, private, public, protected
  • Protected, package, private, public
  • Private, public, protected, package

Questão 165

Questão
What is default package visibility?
Responda
  • 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.

Questão 166

Questão
Form of method determined by its name and arguments
Responda
  • Java method
  • Signature method
  • Get method
  • Data method
  • Set method

Questão 167

Questão
A tree where all nodes should have 2 children and leaves have no children is called?
Responda
  • full binary tree
  • general tree
  • unary tree
  • perfect tree
  • binary tree

Questão 168

Questão
An____ specifies the requirements of an ADT as a contract between the____ and ____; A ____ implements the ADT
Responda
  • interface, user, developer, method
  • implemetation, developer, user, class
  • interface, developer, user,class
  • implemetation, user, developer, class
  • implemetation, developer, user, method

Questão 169

Questão
Visit root node, traverses left subtree, traverse right subtree traversal is called?
Responda
  • inorder
  • preorder
  • postorder

Questão 170

Questão
An interface can be implemented by multiple classes -
Responda
  • true
  • false

Questão 171

Questão
Traverse left subtree, Visit root node, traverse right subtree traversal is called?
Responda
  • preorder
  • inorder
  • postorder

Questão 172

Questão
traverse left subtree visit root node traversal is called?
Responda
  • inorder
  • postorder
  • preorder

Questão 173

Questão
This method of a binary tree class return true if tree is a leaf and false otherwise?
Responda
  • isLeaf()
  • isEmpty()
  • noMore()
  • isLast()
  • goHome()

Questão 174

Questão
Element insertion to a Binary Search tree costs?
Responda
  • O(logn)
  • O(1)
  • O(n)
  • O(nlogn)

Questão 175

Questão
Does binary search tree contain duplicates?
Responda
  • no
  • yes
  • go home
  • maybe

Questão 176

Questão
Complete binary tree where all children must be smaller than parents is?
Responda
  • maxheap
  • minheap
  • hiphop
  • treeheap

Questão 177

Questão
Complete binary tree where all children must be bigger than parents is?
Responda
  • minheap
  • maxheap
  • hiphop
  • fullheap
  • treeheap

Questão 178

Questão
Insert and remove items from a heap costs?
Responda
  • O(1)
  • O(n)
  • O(nlogn)
  • O(nxn)

Questão 179

Questão
The heap is used to implement the special kind of a queue called priority queue
Responda
  • heap
  • deap
  • DFS
  • DBS

Questão 180

Questão
A ________ tree is a binary tree used to store a code that facilitates the compression
Responda
  • heap
  • Huffman
  • Dijkstra
  • DFS
  • DBS

Questão 181

Questão
Data structure based on BST where all items are sorted and unique is?
Responda
  • graph
  • treeMap
  • treeSet
  • vector
  • tree

Questão 182

Questão
Recursive nonlinear data structure that is used to represent data organized in a hierarchy?
Responda
  • tree
  • vector
  • graph
  • arrayList
  • linkedList

Questão 183

Questão
In a Huffman tree, the item with the lowest frequency of occurrence will have the _____ code.
Responda
  • longest
  • easiest
  • shortest
  • binary
  • deepest

Questão 184

Questão
Which of the following is recursive algorithm?
Responda
  • QuickSort
  • Insertionsort
  • Selectionsort
  • BUBBLESORT

Questão 185

Questão
Average time complexity of Selection sort is?
Responda
  • O(n^2)
  • O(n^3)
  • O(n^2,25)
  • O(n)

Questão 186

Questão
Average time complexity of Heap sort is?
Responda
  • O(logn)
  • O(nlogn)
  • O(n)
  • O(1)

Questão 187

Questão
Average time complexity of Quick sort is?
Responda
  • O(nlogn)
  • O(logn)
  • O(n)
  • O(1)

Semelhante

GRAMÁTICA da LÍNGUA PORTUGUESA
Viviana Veloso
Simulado para concursos públicos
Alessandra S.
Os processos de gestão de pessoas
brunocmt
Gramática para o First Certificate II
GoConqr suporte .
10 Dicas de Como Estudar Online
GoConqr suporte .
Controle de Constitucionalidade
GoConqr suporte .
Quiz de biologia
Lafaiete
Direito Constitucional I
Dani Savaris
CEJA VIRTUAL - FASCÍCULO 1 - UNIDADE 1 - CULTURA E IDENTIDADE
Hilário Jr
Lista de Adjetivos Mais Usados com os Comparativos em Inglês
Paula Simões