sdp4

Descrição

SDP4 Quiz sobre sdp4, criado por Csse 1502 em 21-05-2017.
Csse 1502
Quiz por Csse 1502, atualizado more than 1 year ago
Csse 1502
Criado por Csse 1502 mais de 7 anos atrás
979
1

Resumo de Recurso

Questão 1

Questão
Re-balancing of AVL tree costs
Responda
  • O(logn)
  • O(nlogn)
  • O(1)
  • O(n)

Questão 2

Questão
In what tree, for every node the height of its left subtree and right subtree differs at least by one
Responda
  • Threaded binary tree
  • BST
  • AVL tree
  • Complete tree

Questão 3

Questão
Which of the following is true about the total number of nodes in a binary tree with depth two?
Responda
  • It is at most four
  • It is at most seven
  • There is no bound on the number of nodes
  • It is at most two

Questão 4

Questão
Which of the following is not a valid binary search tree?

Questão 5

Questão
The result of postfix expression: 4 2 + 3 5 1 - * +
Responda
  • 18
  • 10
  • 15
  • 8

Questão 6

Questão
The infix expression A+((B-C)*D) is correctly represented in prefix notation as
Responda
  • A+BC-D*
  • ABC-D*+
  • +A*-BCD
  • A+B-C*D

Questão 7

Questão
The result of postfix expression: 5 7 + 6 2 - *
Responda
  • 40
  • 38
  • 46
  • 48

Questão 8

Questão
The prefix expression reverse to postfix: * + A B + C D
Responda
  • A B + C D + * *
  • A B + C D + *
  • None of them
  • A B + C D * +

Questão 9

Questão
What the result of the following expression: 2 3 8 * + 4 48 4 2 + / 6 * + -
Responda
  • -26
  • 12
  • -20
  • -10

Questão 10

Questão
By definition, a(n)______ graph contains edges that can be traversed in either direction.
Responda
  • undirected
  • directed
  • disconnected
  • connected

Questão 11

Questão
What is the weight of a minimum spanning tree of the following graph?
Responda
  • 31
  • 35
  • 41
  • 38
  • 29

Questão 12

Questão
Which of the following algorithms use a dynamic programming approach (not greedy)? Выберите один или несколько ответов:
Responda
  • Floyd Algorithm
  • Bellman-Ford Algorithm
  • Dijkstra Algorithm
  • Prim Algorithm

Questão 13

Questão
The MST of the graph below:
Responda
  • 3, 1, 2, 9, 4, 7, 5
  • 3, 1, 2, 9, 10, 7, 5
  • 3, 1, 2, 9, 11, 7, 5
  • 3, 1, 2, 9, 4, 7, 8

Questão 14

Questão
What is the Run-time of the Dijkstra’s original algorithm? (without min priority queue)
Responda
  • O(E+V)
  • O(E+VlogV)
  • O(E^2)
  • O(V^2)

Questão 15

Questão
Choose the algorithm with not greedy approach ….
Responda
  • Prim Algorithm
  • Dijkstra Algorithm
  • Floyd Algorithm
  • Kruskal Algorithm

Questão 16

Questão
The Floyd-Warshall algorithm for all-pair shortest paths computation is based on:
Responda
  • Greedy paradigm
  • Dynamic Programming paradigm
  • None
  • Divide-and-Conquer paradigm

Questão 17

Questão
The sequence of visited nodes by Dijkstra algorithm:
Responda
  • S, B, A, С, t
  • None of them
  • S, A, B, C, t
  • S, B, A, t

Questão 18

Questão
The following heap : 18 15 9 14 11 2 7 6 12 3, add there 17 and choose right sequence:
Responda
  • 18 17 9 14 15 2 7 12 6 3 11
  • 18 15 9 14 11 2 7 6 12 3 17
  • 18 17 9 14 15 2 7 6 11 12 3
  • 18 17 9 14 15 2 7 6 12 3 11

Questão 19

Questão
In the deletion operation of max heap, the root is replaced by:
Responda
  • Last element of the last level
  • Next available value in the right sub-tree
  • Next available value in the left sub-tree
  • Any random value from the heap

Questão 20

Questão
Delete max element from the heap and choose the answer: 18 17 9 14 15 2 7 6 12 3 11
Responda
  • 17 15 9 14 12 11 2 7 6 3
  • 17 15 9 14 11 2 7 6 12 3
  • 17 9 14 15 2 7 6 12 3 11
  • 17 15 14 12 11 9 2 7 6 3

Questão 21

Questão
In a min heap
Responda
  • A minimum values are sorted
  • Parent nodes have less value than child nodes
  • Maximum value is contained by the root node
  • Child nodes have less value than parent nodes

Questão 22

Questão
The result of this postfix expression: 10 5 + 60 6 / * 8 – is
Responda
  • 82
  • 284
  • 273
  • 142

Questão 23

Questão
Please find the postfix expression from prefix: - * - + a b c / e f - g / h i
Responda
  • a b + c - - e f / * g h i / -
  • a b + c - e f / * g h - i / -
  • a b + c - e f / * g h i / -
  • a b + c - e f / * g h i / - -

Questão 24

Questão
If this tree is used for sorting, then new no 8 should be placed as the
Responda
  • right child of the node labelled 5
  • right child of the node labelled 30
  • left child of the node labelled 10
  • left child of the node labelled 30

Questão 25

Questão
Number of possible binary trees with 3 nodes is (Kahoot 100%)
Responda
  • 9
  • 3
  • 14
  • 5

Questão 26

Questão
The result of this postfix expression: 4 5 7 2 + - *
Responda
  • -10
  • -11
  • -16
  • -5

Questão 27

Questão
Which of the following statements about binary trees is true?
Responda
  • A binary tree contains exactly two nodes.
  • Exactly two paths exist between any two nodes in a binary tree.
  • Every node of a binary tree has at most two children.
  • Every node of a binary tree has at most two predecessors.

Questão 28

Questão
A binary tree T has 20 leaves. The number of nodes in T having two children is
Responda
  • Any number between 10 and 20
  • 18
  • 19
  • 17

Questão 29

Questão
Choose the Bipartite graph from the following graphs...

Questão 30

Questão
Each of the following indicates a reasonable way to implement graphs except
Responda
  • a BST
  • a Boolean matrix
  • an adjacency list
  • an edge list

Questão 31

Questão
Postfix expression is just a reverse of prefix expression.
Responda
  • Верно
  • Неверно

Questão 32

Questão
Choose the regular expression which -- "Search all string which start with "a"
Responda
  • a*
  • a+
  • a$
  • ^a

Questão 33

Questão
Which of the following algorithms use a greedy approach?
Responda
  • Prim, Kruskal, Floyd
  • Prim, Kruskal, Dijkstra
  • Prim, Bellman-Ford, Floyd
  • Prim, Kruskal, Bellman-Ford

Questão 34

Questão
A max-heap is a heap where the value of each parent is greater than or equal to the values of its children. Which of the following is a max-heap?
Responda
  • B
  • C
  • D
  • A

Questão 35

Questão
Heap with n elements with the smallest element at the root, 7 smallest element can be found
Responda
  • O(1)
  • O(n)
  • O(nlogn)
  • O(logn)

Questão 36

Questão
The elements 32, 15, 20, 30, 12, 25, 16 are inserted one by one in the given order into a Max Heap. The result Max Heap is
Responda
  • C
  • B
  • D
  • A

Questão 37

Questão
Group A Group B a) Dijkstra's single shortest path algo p) Dynamic Programming b) Bellmen Ford's single shortest path algo q) Greedy Algorithm c) Floyd Warshell's all pair shortest path algo. r) Backtracking
Responda
  • a-q, b-p, c-p
  • a-p, b-p, c-p
  • a-r, b-q, c-p
  • a-p, b-r, c-q

Questão 38

Questão
Time complexity of Depth First Traversal of is
Responda
  • Θ(|V|*|E|)
  • Θ(|V|)
  • Θ(|V|+|E|)
  • Θ(|E|)

Questão 39

Questão
The time complexity of heap sort in worst case is
Responda
  • O(nlogn)
  • O(n)
  • O(n2)
  • O(logn)

Questão 40

Questão
Which of the following algorithms has lowest worst case time complexity?
Responda
  • Quick sort
  • Selection sort
  • Insertion sort
  • Heap sort

Questão 41

Questão
BST: 50, 15, 62, 5, 20,58, 91, 3,8 The number of nodes in the left of the root is
Responda
  • 4
  • 5
  • 3
  • 7

Questão 42

Questão
Heap is an example of
Responda
  • BST
  • Complete BST
  • Spanning tree
  • General tree

Questão 43

Questão
What is the run-time complexity of the Floyd-Warshall algorithm? (worst case performance)
Responda
  • O(V^2)
  • O(V*E)
  • O(V+E)
  • O(V^3)

Questão 44

Questão
For all binary search trees, where d represents the depth of a tree and n represents the number of nodes, the worst-case complexity of searching for an element is
Responda
  • O(n/d)
  • O(n*d)
  • O(d)
  • O(n)

Questão 45

Questão
Which of the following statements is true of both depth-first and breadth-first searches?
Responda
  • Their implementations each require a stack of nodes.
  • From a given starting node, they will not necessarily explore all other nodes in a graph.
  • Their implementations each require a queue of nodes.
  • They can each be used calculate the shortest path between two nodes in a weighted graph.

Questão 46

Questão
BST run-time complexity of search function in worst case is
Responda
  • O(n)
  • O(logn)
  • O(n^2)
  • O(nlogn)

Questão 47

Questão
In a binary min heap containing n numbers, the smallest element can be found in time
Responda
  • O(1)
  • O(logn)
  • O(n)
  • none of this

Questão 48

Questão
A full binary tree n leaves contains
Responda
  • n nodes,
  • 2n-1 nodes
  • n nodes
  • 2n nodes

Questão 49

Questão
Which one of the following array represents a binary max-heap?
Responda
  • 25,12,16,13,10,8,14,
  • 25,14,12,14,10,8,16
  • 25,14,16,13,10,8,12
  • 25,12,16,13,10,8,14

Questão 50

Questão
In a binary max heap containing n numbers,the smallest element can be found in time
Responda
  • O(n)
  • O(logn)
  • O(1)
  • O(nlogn)

Questão 51

Questão
The maximum number of nodes on level i of a binary tree is
Responda
  • 2i-1
  • i+1
  • 3i-1
  • 2i+2

Questão 52

Questão
Which algorithms – can find vertices x & y if there are presented a path between them?
Responda
  • DFS
  • BFS
  • Both BFS and DFS
  • None of them

Questão 53

Questão
Choose the trasitive closure for the graph below
Responda
  • 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 1
  • 1 0 1 1 1 1 1 1 1 1 1 1 0 0 0 0
  • 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 1
  • 1 0 0 1 1 1 1 1 0 1 0 1 0 0 0 1

Questão 54

Questão
What is the run-time complexity of the Kruskal's algorithm? (average performance)
Responda
  • O(ElogV)
  • O(V^3)
  • O(VlogE)
  • O(V^2)

Questão 55

Questão
Suppose we run Dijkstra’s single source shortest-path algorithm. Find the minimum path from P to U and what sequence of visited points you have?
Responda
  • P, S, R, U
  • P, Q, S, U
  • P, Q, R, U
  • P, Q, R, S, U

Questão 56

Questão
How does the use of parenthesis change the expression tree? Which graph below represents the equation 3+2*4-1

Questão 57

Questão
What is the result of the program below? #include <stdio.h> int main(){ char *ch; while(x=0; x<=255; x++) printf(“ASCII value of %d character %c\n”,x,x); return 0; }
Responda
  • The code prints all ASCII values and its characters
  • Error: x undeclared identifier
  • The code generates an infinite loop
  • Error: while statement missing

Questão 58

Questão
What is the output of the following program? #include <stdio.h> int main(){ char *nstring=”Hello”; while(*nstring) printf(“%c”, *nstring++); }
Responda
  • ello
  • Runtime error
  • Compile error
  • Hello

Questão 59

Questão
What will be the output of the program? #include <stdio.h> int main(){ int k, num=30; k=(num>5 ? (num <= 10? 100 : 200):500); printf("%d\n", num); return 0; }
Responda
  • 30
  • 500
  • 200
  • 100

Questão 60

Questão
What statement can print \n on the screen? #include <stdio.h> int main(){ printf("\\n"); return 0; }
Responda
  • None
  • printf(“n\”);
  • printf(“\\n”);
  • printf(“n”);
  • printf(“\n”);

Questão 61

Questão
How many times the program will print “Hello”? #include<stdio.h> int main(){ printf("Hello"); main(); return 0; }
Responda
  • 0
  • Compilation error
  • Unlimited times
  • Till stack run over

Questão 62

Questão
What is the built library function to compare two strings?
Responda
  • IsEqual();
  • Strcmp();
  • Strcompare();
  • Strstr();

Questão 63

Questão
According to ANSI specification, how to declare main() function with command-line arguments?
Responda
  • int char main(int argc, *argv)
  • None
  • int main(){ int char (*argv argc); }
  • int main(int argc, char *argv[])

Questão 64

Questão
Queue worst time complexity to delete some value…
Responda
  • O(1)
  • O(n^2)
  • O(log n)
  • O(n)

Questão 65

Questão
The keys 12,18,13,2,3,23,5 and 15 are inserted into an initially empty hash table of length 10 using open addressing with hash function h(k)=k mod 10 and linear probing. What is the resultant hash table?
Responda
  • A
  • B
  • D
  • C

Questão 66

Questão
What is the worst time complexity of the hash table in Big O notation?
Responda
  • O(n logn)
  • O(n)
  • O(1)
  • O(log n)

Questão 67

Questão
Stack works by the principle
Responda
  • LILO
  • FIFO
  • LIFO
  • FILO

Questão 68

Questão
Linked list is generally considered as an example of ____ type of memory allocation.
Responda
  • Compile time
  • Static
  • Dynamic
  • Local

Questão 69

Questão
A hash table of length 10 uses open addressing with hash function h(k)=k mod 10, and linear probing. After inserting 6 values into an empty hash table, the table is as shown below.
Responda
  • 42,46,33,23,34,52
  • 46,42,34,52,23,33
  • 34,42,23,52,33,46
  • 46,34,42,23,52,33

Questão 70

Questão
An algorithm is
Responda
  • A loosely written code to make final code
  • A step by step procedure to solve problem
  • All of the above
  • A piece of code to be executed

Questão 71

Questão
What is the best time complexity of the binary search?
Responda
  • O(n)
  • O(1)
  • O(log n)
  • O(n logn)

Questão 72

Questão
What is the sorting algorithms is presented on the example below?
Responda
  • Insertion sort
  • Radix sort
  • Quick sort
  • Bucket sort

Questão 73

Questão
Which sorting algorithms is most efficient to sort string consisting of ASCII characters?
Responda
  • Quick sort
  • None
  • Counting sort
  • Merge sort

Questão 74

Questão
A pivot element to partition unsorted list is used in
Responda
  • Quick sort
  • Insertion sort
  • Merge sort
  • Selection sort

Questão 75

Questão
What is the gcc?
Responda
  • The command to create new file
  • The command to show all errors during compiling
  • The command doesn’t exist
  • The compiler

Questão 76

Questão
What is rmdir command in Unix OS?
Responda
  • This command creates a directory
  • This command copies a file
  • This command removes a file
  • This command removes(deletes) a directory

Questão 77

Questão
What is touch command in Unix OS?
Responda
  • This command builds products based on rules contained in a file
  • This command updates the last modification time of a file or directory
  • These commands allow you to view the contents of a file without editing the file
  • This family of commands allows you to open files for editing

Questão 78

Questão
“.” In Unix like systems
Responda
  • Refers to the containing directory
  • Refers to your home directory
  • Refers to the root directory
  • Refers to the current directory

Questão 79

Questão
The default executable generation on Unix for a C program is
Responda
  • a.exe
  • default.out
  • a.out
  • out.a

Questão 80

Questão
In the given below statement,what does the “arr” indicate? char *arr[30];
Responda
  • arr is a pointer to an array
  • arr is a array of 30 characters
  • arr is a array of function
  • arr is a array of 30 character pointers

Questão 81

Questão
What function is used to free the allocated memory for the program below? #include <stdio.h> #include<stdlib.h> int main(){ int *k; k=(int*) malloc(10* sizeof(int)); return 0; }
Responda
  • clean k;
  • delete k;
  • free(k);
  • memfree(k);

Questão 82

Questão
Which library functions help users to dynamically allocate memory?
Responda
  • malloc(), memalloc()
  • macalloc(), calloc()
  • realloc(), calloc()
  • malloc(), calloc()

Questão 83

Questão
Which header statement is missing in the given below program to get the desired output? #include <stdio.h> int main(){ double x=1234321; if(isdigit(x)){ printf("%lf",x); return 0; }
Responda
  • #include <ctype.h>
  • #include <math.h>
  • #include <string.h>
  • #include <stdlib.h>

Questão 84

Questão
Accessing top element in stack is constant time operation
Responda
  • Верно
  • Неверно

Questão 85

Questão
Process of Removing element from the stack is called as…(C++)
Responda
  • push
  • pop
  • delete
  • clean

Questão 86

Questão
A linked list in which the last node of Linked list points to the first is called a______
Responda
  • doubly LL
  • singly LL
  • hybrid LL
  • circular LL

Questão 87

Questão
A doubly linked list performs traversal in____
Responda
  • none
  • either direction
  • circular direction
  • any direction

Questão 88

Questão
LL is used to implement the Stack then which of the following node is - Top of the Stack?
Responda
  • middle node
  • first node
  • any node
  • last node

Questão 89

Questão
What is the worst time complexity of the binary search algorithm?
Responda
  • O(1)
  • O(logn)
  • none
  • O(n)

Questão 90

Questão
What is the worst time complexity of the bubble sort?
Responda
  • O(n^2)
  • O(n)
  • O(nlogn)
  • O(n^3)

Questão 91

Questão
Which of the following sorting algorithms has the lowest worst-case complexity?
Responda
  • Bubble Sort
  • Selection Sort
  • Quick Sort
  • Merge Sort

Questão 92

Questão
What is make command in Unix OS?
Responda
  • This command builds products based on rules contained in a makefile
  • This command compiles a Java program
  • This command is most commonly used to display the contents of a file on the terminal
  • This is the compiler, which can take many options

Questão 93

Questão
What is ls command in UNIX OS?
Responda
  • This command creates a directory
  • This command renames an entity
  • This command list the contents of a directory
  • This command displays the path of the current directory

Questão 94

Questão
Unix command mv ___
Responda
  • This command renames an entity
  • This command removes(deletes) a directory
  • This command removes a file
  • This command copies a file

Questão 95

Questão
The keyboard used to transfer control from a function back to the calling function is
Responda
  • switch
  • return
  • go back
  • go to

Questão 96

Questão
What is the result of the program? #include<stdio.h> int main() { int const a = 5; a++; printf("%d", a); }
Responda
  • Stack is run over
  • None
  • 5
  • Compilation error

Questão 97

Questão
What value strcmp() function returns when two strings are the same?
Responda
  • true
  • 0
  • -1
  • 1

Questão 98

Questão
Stack time complexity to insert some value …
Responda
  • O(1)
  • O(n)
  • O(logn)
  • O(n/logn)

Questão 99

Questão
Which if the following is not a type of Linked list?
Responda
  • hybrid LL
  • singly LL
  • doubly LL
  • circular LL

Questão 100

Questão
Queue can be implemented using a list
Responda
  • Верно
  • Неверно

Questão 101

Questão
Which of the following container has search efficiency of O(1) (Best case)
Responda
  • Doubly Linked List
  • Hash table
  • Heap
  • Linked List

Questão 102

Questão
“/” in Unix like systems
Responda
  • refers to the current directory
  • refers to the containing directory
  • refers to your home directory
  • refers to the root directory

Questão 103

Questão
Unix command pwd_____
Responda
  • This command removes a file
  • This command creates a directory
  • This command displays manual pages for various commands
  • This command displays the path of the current directory

Questão 104

Questão
A linked-list is a dynamic structure
Responda
  • Верно
  • Неверно

Questão 105

Questão
What are two operators for ascending members of a structure and when are they used?
Responda
  • none
  • and->
  • and this
  • and-->

Questão 106

Questão
What is the malloc & calloc?
Responda
  • allocate the dynamic memory
  • allocate the dynamic memory and save zero there
  • create new variable
  • free dynamic memory

Questão 107

Questão
A local variable is stored in __
Responda
  • heap segment
  • stack segment
  • code segment
  • none

Questão 108

Questão
Which scanf(statement will you use to scan a float variable (a) and double variable (b)?
Responda
  • scanf(“%f%lf”, &a, &b);
  • scanf(“%lf%lf”, &a, &b);
  • scanf(“%f%f”, &a, &b);
  • scanf(“%Lf%Lf”, &a, &b);

Questão 109

Questão
A single line comment in C language source code can begin with __
Responda
  • :
  • /*
  • ;
  • //

Questão 110

Questão
Only top element can be accessed in stack
Responda
  • верно
  • неверно

Questão 111

Questão
Each Node contain minimum two fields one field called data field to store data. Another field _
Responda
  • pointer to Node
  • pointer to character
  • pointer to an integer
  • pointer to class

Questão 112

Questão
A hash table of length 10 uses quadratic function h(k)=k mod 10. After inserting 6 values into an empty hash table, the table is as shown below. 0 1 2 42 3 23 4 34 5 6 52 7 46 8 9 33 Which one of the following choices given a possible order in which the key values could have been inserted in the table?
Responda
  • 46, 42, 34, 52, 23, 33
  • 34, 42, 23, 52, 33, 46
  • 42, 23, 34, 52, 46, 33
  • 46, 34, 42, 23, 52, 33

Questão 113

Questão
How do you specify double constant 3.14 as a long double?
Responda
  • %Lf
  • %ld
  • %f
  • %lf

Questão 114

Questão
What built in library function to adjust the allocated dynamic memory size
Responda
  • calloc
  • malloc
  • recalloc
  • realloc

Questão 115

Questão
Queue works by the principle
Responda
  • Last in First out
  • none
  • First in First out FIFO
  • First in Last out

Questão 116

Questão
How to convert some data to the lower case in C programming language?
Responda
  • toupper(); #include <ctype.h>
  • tolower();, #include <stdlib.h>
  • toupper(); #include <stdlib.h>
  • tolower();, #include <ctype.h>

Questão 117

Questão
How to create the boolean type in C without usage of #include <stdbool.h>
Responda
  • _Bool
  • boolean
  • _Boolean
  • bool

Questão 118

Questão
“r+” in fopen function tries to open the file for …
Responda
  • read & write
  • append new content to the file
  • only reading this file
  • reading and append new content to the file

Questão 119

Questão
Linked list works by the FIFO method
Responda
  • верно
  • неверно

Questão 120

Questão
What is best time complexity of search operation in the LL?
Responda
  • O(logn)
  • none
  • O(1)
  • O(n)

Questão 121

Questão
What is the general formula for double hashing in the hast table?
Responda
  • h( k, i) = ( h1(k) + i * h2(k)) mod m
  • none
  • h(x) = x mod m
  • h (k, i) = ( h’(k) + i^2) mod m

Questão 122

Questão
What function can be used to free the memory allocated by calloc()?
Responda
  • delete();
  • strcat();
  • free();
  • memfree();

Questão 123

Questão
Identify the incorrect file opening mode from the following
Responda
  • r
  • x
  • w
  • a

Questão 124

Questão
In the stack process of inserting an element in the stack is called as _____
Responda
  • push
  • insert
  • pop
  • create

Questão 125

Questão
What is the output of the following program? #include <stdio.h> int main(){ int a[] = {2,1}; printf("%d", *a); }
Responda
  • 2
  • 0
  • 1
  • Compile error

Questão 126

Questão
The merge sort algorithm is based on:
Responda
  • Divide-and-Conquer paradigm
  • Greedy paradigm
  • Dynamic Programming paradigm
  • None of these

Questão 127

Questão
Recursion uses more memory space than iteration because
Responda
  • None of them
  • it uses stack instead of queue & every recursive call has to be stored
  • every recursive call has to be stored
  • it uses stack instead of queue

Questão 128

Questão
Shell sort uses
Responda
  • quick sort
  • insertion sort
  • selection sort
  • merge sort

Questão 129

Questão
What is the result of the program below? #include <stdio.h> int main(){ int a=9, b=&a, *pointer=b+0; printf("%u", *pointer); }
Responda
  • Address of pointer
  • Compile error
  • Segmentation fault
  • 9
  • 0

Questão 130

Questão
What is the maximum number of nodes that a perfectly balanced tree with a height of 7 can contain?
Responda
  • (2**8)-1 = 255 (Maximum) (2**7) = 128 (Minimum)
  • (2**7)-1 = 127 (Maximum) (2**5) = 32 (Minimum)
  • (2**7)-1 = 127 (Maximum) (2**6) = 64 (Minimum)
  • (2**6)-1 = 63 (Maximum) (2**5) = 32 (Minimum)

Questão 131

Questão
Find the MST from the graph below:
Responda
  • (FB), (HC), (BC), (IH), (AB), (EC), (ED), (EG)
  • (FB), (HC), (BC), (IH), (AB), (EA), (ED), (EG)
  • (FB), (HC), (BC), (IH), (AB), (EA), (ED), (HE)
  • (FB), (HC), (BC), (IH), (AB), (EC), (FD), (EG)

Questão 132

Questão
The minimum cost of path from A node to I node by the following graph:
Responda
  • 19
  • 10
  • 16
  • 26

Questão 133

Questão
Add element “K” in the following max heap: g,c,f,b,a,d
Responda
  • None of them
  • c,g,b,a,d,f,k
  • k,c,g,b,a,d,f
  • c,g,b,a,k,d,f

Questão 134

Questão
Translate the following expression tree graph into the mathematical equation that it represents.26. Translate the following expression tree graph into the mathematical equation that it represents.
Responda
  • (2+3)*(4-1) = 15
  • (3+2)*(4-1) = 15
  • (3+2)*(4-1) = 16
  • (3+2)*(1-4) = 15

Questão 135

Questão
Find the cost of MST in the graph below:
Responda
  • 47
  • 36
  • 46
  • 50

Questão 136

Questão
Consider the undirected graph below: Using Prim's algorithm to construct a minimum spanning tree starting with node A, which one of the following sequences of edges represents a possible order in which the edges would be added to construct the minimum spanning tree?
Responda
  • (A, D), (A, B), (A, C), (C, F), (G, E), (F, G)
  • (A, B), (A, D), (D, F), (F, G), (G, E), (F, C)
  • (E, G), (C, F), (F, G), (A, D), (A, B), (A, C)
  • (A, D), (A, B), (D, F), (F, C), (F, G), (G, E)

Questão 137

Questão
Find the minimum path from a to i Dijkstra algorithm. Choose the sequence of visited Nodes.
Responda
  • a->c->d->b->e->g->
  • a->c->g->b->e->d->
  • a->c->d->b->g->e->
  • a->d->g->b->e->

Questão 138

Questão
What is the run-time complexity of the Floyd-Warshall algorithm?(best case performance)
Responda
  • O(V*E)
  • O(V+E)
  • O(V^3)
  • O(V^2)

Questão 139

Questão
The Dijkstra and the Bellman-Ford algorithms both determine
Responda
  • the shortest path between all nodes in a graph
  • the shortest path between two nodes in a graph
  • whether a graph is directed or undirected
  • the edge with the greatest weight in a graph
  • whether or not a graph is a tree

Questão 140

Questão
Choose the algorithm with not-greedy approach
Responda
  • Prim Algorithm
  • Floyd Algorithm
  • Dijkstra Algorithm
  • Kruskal Algorithm

Questão 141

Questão
Having parenthesis in an expression tree serves to balance it better.
Responda
  • True
  • False

Questão 142

Questão
What are two operators for accessing members of a structure and when are they used?
Responda
  • . and->
  • . and this
  • None
  • . and--->

Questão 143

Questão
\ What is the difference between a and a+ modes?
Responda
  • a - open for appending, a+ - open for reading and appending
  • a - open for reading and appending, a+ - open for appending
  • a -open for appending, a+ - open for reading and writing
  • a - open for appending, a+ - open for writing and appending

Questão 144

Questão
The nodes of a ______linked list can be traversed_____.
Responda
  • Singly, forward and backward
  • Doubly, forward only
  • Doubly, backward only
  • Singly, forward only

Questão 145

Questão
A hash table of length 10 uses double hashing and hash function h(k)=k mod 10. After inserting 6 values into an empty hash table, the table is as shown Which one of the following choices gives a possible order in which the key values could have been inserted in the table?
Responda
  • 34,52,42,23,33,46
  • 33,46,42,34,52,23
  • 46,34,42,23,52,33
  • 42,46,33,23,34,52

Questão 146

Questão
What is the formula to calculate the load factor of hash table? (n number of elements, m size of table)
Responda
  • ɻ= n/m
  • ɻ =n*m
  • ɻ =n/sqrt(m)
  • ɻ =n/m^2

Questão 147

Questão
Which of the following is a balanced tree for the numbers 1-9? There may be more than one answer.

Questão 148

Questão
What are algorithms appropriate to find the minimum spanning tree?What are algorithms appropriate to find the minimum spanning tree? Выберите один или несколько ответов:
Responda
  • Prim algorithm
  • Floyd algorithm
  • Bellman-Ford algorithm
  • Kruskal's algorithm

Questão 149

Questão
The approach helps to balance tree (One or multiple)
Responda
  • AVL
  • BST
  • Red Black Tree
  • none

Questão 150

Questão
String in C (One or multiple)
Responda
  • char* name;
  • char name[4] = “Hello”;
  • none
  • char name[10];

Questão 151

Questão
String in C programming language… (One or multiple)
Responda
  • char name[6] = “Ernur”;
  • char name[5] = “Ernur”;
  • char* name = “Ernur”;
  • char name;

Questão 152

Questão
Identify the C compiler in UNIX like operating systems. (One or multiple)
Responda
  • vc++
  • cc
  • Borland
  • gcc

Semelhante

Dicas para Estudar para o Concurso da Caixa
Alessandra S.
Direito Civil - Personalidade Jurídica
Lucas Ávila
Vocabulário sobre o corpo em Francês
Catarina D.
Decore as Vitaminas
replaybr
DIREITO ADMINISTRATIVO.
eldersilva.10
Mapas Mentais em Sala de Aula
GoConqr suporte .
Conhecimentos Gerais
GoConqr suporte .
DITADURA MILITAR
Gabriela Vianna
Mentalidade de Crescimento
GoConqr suporte .
PROTAGONISMO DO ALUNO
Alessandra S.
TGA - Teoria Clássica
Natanael Lima