Chapter 1

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

ADTs allow programmers to _____.

focus on higher-level operations as per a program's needs

What is the correct sequence for inserting an item in a linked list?

1. Create a list node for a new item. 2. Assign a pointer of the new item to point to the next item. 3. Update the pointer of the previous node to point to the new node.

Which abstract data type (ADT) is most suitable to store a list of perishable products such that the product with the nearest expiry date is removed first?

A priority queue

Which of the following is best represented by a graph? A file system on a computer The Undo command in a word processor A work scheduling operation A telephone network

A telephone network

Which is not a characteristic of an NP-complete problem? No efficient algorithm has been found to solve an NP-complete problem. An efficient algorithm to solve an NP-complete problem may be possible. If an NP-complete problem has an efficient solution, then all NP-complete problems will have an efficient solution. All NP-complete problems can be solved efficiently.

All NP-complete problems can be solved efficiently.

Which of the following is correct for a list ADT?

An element can be found and removed from the end of the list.

A manufacturing plant has many ways to assemble a product. Which algorithm will be useful to find the quickest way?

Dijkstra's shortest path

Which of the following statements is correct? Every data structure has a specific algorithm to implement a certain operation. Algorithms cannot utilize data structures to store and organize data. The algorithm to append an item in an array is the same as appending an item to a linked list. Data structures define only how data is organized and stored.

Every data structure has a specific algorithm to implement a certain operation.

Which algorithm is best suited for a plagiarism check?

Longest common substring

In a linked list, each node stores a _____ the next node.

Pointer to

Which of the following statements is correct? The queue ADT supports the insertion and deletion of items at the front and the back. The list ADT supports the printing of the list contents but the queue ADT does not. The queue ADT supports the removing of items from one end and the adding of items to the other end but the list ADT does not. The queue ADT supports the printing of the list contents but the list ADT does not.

The list ADT supports the printing of the list contents but the queue ADT does not.

In a computational problem for finding the highest salary of an employee in a company, what is the input?

The list of employees' salaries

Which abstract data type (ADT) is suited to check whether a given string is a palindrome?

a deque

Which abstract data type (ADT) is best suited to store the names of all currently available smartphone models?

a set

The process of providing only the essentials and hiding the details is known as _____.

abstraction

A stack abstract data type (ADT) is implemented using a(n) _____ data structure. array linked list heap binary search tree

linked list

Which data type is best suited to store the names and grades of students?

record

Appending an element in an array involves increasing the array's _____.

size


Set pelajaran terkait

Quiz 1: Prayer, Salvation, and Attributes of God

View Set

3.13: Unit Test: How Important Ideas are Expressed

View Set

Chapter 14 The Brain and Cranial Nerves (by BuGay)

View Set

Cloud Management - INFOU796 - Quiz # 1 mine

View Set

كتاب أهم ألف كلمة إنجليزية

View Set

Accounting 2: Chapter 9 (exam 3)

View Set