Data Structures - Test 1

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

Omega Notation, Ω The notation Ω(n) is the formal way to express the lower bound of an algorithm's running time. It measures the _ case time complexity or the best amount of time an algorithm can possibly take to complete.

Best

_ Sort is a comparison-based sorting algorithm in which each pair of adjacent elements is compared and the elements are swapped if they are not in order. This algorithm is not suitable for large data sets as its average and worst case complexity are of Ο(n^2) where n is the number of items.

Bubble

Each link of a linked list contains a link to the next link called _.

Next

Linked list can be visualized as a chain of _, where every _ points to the next _. (Only type answer once, it's the same.)

Nodes / Node

A _ algorithm is one which does not take into account the elements which are already sorted. They try to force every single element to be re-ordered to confirm their sortedness.

Non-Adaptive / Non Adaptive

A sequence of values is said to be in _ order, if the successive element is greater than or equal to its previous element in the sequence. This order occurs when the sequence contains duplicate values. For example: 1, 3, 3, 6, 8, 9.

Non-Decreasing / Non Decreasing

A sequence of values is said to be in _ order, if the successive element is less than or equal to its previous element in the sequence. This order occurs when the sequence contains duplicate values. For example: 9, 8, 6, 3, 3, 1.

Non-Increasing / Non Increasing

Theta Notation, θ The notation θ(n) is the formal way to express both the lower bound and the upper bound of an algorithm's running time. It measures the _ case time complexity.

Average

Characteristics of Data Structures: 1. Correctness 2. _ _ 3. Space Complexity

Time Complexity

Data Definition defines a particular data with the following characteristics: 1. Atomic − Definition should define a single concept. 2. _ − Definition should be able to be mapped to some data element. 3. Accurate − Definition should be unambiguous. 4. Clear and Concise − Definition should be understandable.

Traceable

Printing all array elements one by one is called _.

Traversing

The basic operations on data structures are: 1. _ 2. Searching 3. Insertion 4. Deletion 5. Sorting 6. Merging

Traversing

If a sorting algorithm, after sorting the contents, changes the sequence of similar content in which they appear, it is called _ Sorting.

Unstable

The 5 important categories of algorithms are: 1. Search 2. Sort 3. Insert 4. _ 5. Delete

Update

_ updates an element at the given index in an array.

Update

A _ is a single elementary unit of information representing an attribute of an entity.

Field

A _ is a collection of records of the entities in a given entity set.

File

A linked list contains the connection link to the first link called _.

First

Data items that are divided into sub items are called _ _.

Group Items

_ provides the internal representation of a data structure. _ also provides the definition of the algorithms used in the operations of the data structure. (Only type once, it's the same answer.)

Implementation

Sorting algorithms may require some extra space for comparison and temporary storage of few data elements. These algorithms do not require any extra space and sorting is said to happen within the array itself. This is called _ Sorting. Bubble Sort is an example of this.

In-Place / In Place

A sequence of values is said to be in _ Order, if the successive element is greater than the previous one. For example: 1, 3, 4, 6, 8, 9.

Increasing

Each location of an element in an array has a numerical _, which is used to identify the element.

Index

The 5 important categories of algorithms are: 1. Search 2. Sort 3. _ 4. Update 5. Delete

Insert

Adding an element at the given index into an array is called _.

Insertion

The basic operations on data structures are: 1. Traversing 2. Searching 3. _ 4. Deletion 5. Sorting 6. Merging

Insertion

_ Sort is an in-place comparison-based sorting algorithm. It maintains a sub-list which is always sorted. An element which is to be inserted in this sorted sub-list has to find its appropriate place and then inserted there. The array is searched sequentially and unsorted items are moved and inserted into the sorted sub-list (in the same array). This algorithm is not suitable for large data sets as its average and worst case complexity are of Ο(n^2), where n is the number of items.

Insertion

public void _(int[] list) { · int length = list.length; · · for (int i = 0; i < length; i++) · { · · trickle(list, i); · } } public void trickle(int[] list, index) { · for (int i = index; i >= 1; i--) · { · · if (list[i] < list[i - 1]) · · { · · · swap(list[i], list[i - 1]); · · } · } }

InsertionSort / Insertion Sort / Insertion_Sort

Each data structure has an _. _ represents the set of operations that a data structure supports. An _ only provides the list of supported operations, type of parameters they can accept and return type of these operations. (Only type once, it's the same answer.)

Interface

Ο(log n) is _ efficient than Ο(1) (More or less?)

Less

Ο(n log n) is _ efficient than Ο(n) (More or less?)

Less

Ο(n) is _ efficient than Ο(log n) (More or less?)

Less

Each _ of a linked list can store a data called an element.

Link

A _ _ is a sequence of links which contains items. Each link contains a connection to another link.

Linked List

_ combines more than one array.

Merge

The basic operations on data structures are: 1. Traversing 2. Searching 3. Insertion 4. Deletion 5. Sorting 6. _

Merging

Ο(1) is _ efficient than Ο(log n) (More or less?)

More

Ο(log n) is _ efficient than Ο(n) (More or less?)

More

Ο(n log n) is _ efficient than Ο(n^2) (More or less?)

More

Ο(n) is _ efficient than Ο(n log n) (More or less?)

More

An entity is that which contains certain _ or properties, which may be assigned values

Attributes

What are three common problems applications face? 1. Data Search 2. Processor Speed 3. _ _

Multiple Requests

Common Asymptotic Notations exponential − _

2^Ο(n)

Data Definition defines a particular data with the following characteristics: 1. Atomic − Definition should define a single concept. 2. Traceable − Definition should be able to be mapped to some data element. 3. _ − Definition should be unambiguous. 4. Clear and Concise − Definition should be understandable.

Accurate

A sorting algorithm is said to be _ if it takes advantage of already 'sorted' elements in the list that is to be sorted. That is, while sorting if the source list has some element already sorted, it will take this into account and will try not to re-order them.

Adaptive

An _ is a step-by-step procedure, which defines a set of instructions to be executed in a certain order to get the desired output.

Algorithm

An _ is a container which can hold a fix number of items and these items should be of the same type.

Array

_ _ of an algorithm refers to defining the mathematical boundation/framing of its run-time performance. Using it, we can very well conclude the best case, average case, and worst case scenario of an algorithm.

Asymptotic Analysis

Data Definition defines a particular data with the following characteristics: 1. _ − Definition should define a single concept. 2. Traceable − Definition should be able to be mapped to some data element. 3. Accurate − Definition should be unambiguous. 4. Clear and Concise − Definition should be understandable.

Atomic

public void _(int[] list) { · int length = list.length; · · for (int i = 0; i < length - 1; i++) · { · · for (int j = 0; j < length - i - 1; j++) · · { · · · if (list[j] > list[j + 1]) · · · { · · · · swap(list[j], list[j + 1]); · · · } · · } · } }

BubbleSort / Bubble Sort / Bubble_Sort

Those data types for which a language has built-in support are known as _ Data Types. For example, most languages provide: 1. Integers 2. Boolean 3. Floating (Decimal numbers) 4. Character and String

Built-In / Built In

The two types of Data Types are: 1. _ Data Types 2. Derived Data Types

Built-in / Built In

In a _ linked list, the last item contains a link of the first element as next and the first element has a link to the last element as previous.

Circular

Types of Linked Lists: 1. Simple Linked List 2. Doubly Linked List 3. _ Linked List

Circular

Data Definition defines a particular data with the following characteristics: 1. Atomic − Definition should define a single concept. 2. Traceable − Definition should be able to be mapped to some data element. 3. Accurate − Definition should be unambiguous. 4. _ _ _ − Definition should be understandable.

Clear and Concise

Characteristics of Data Structures: 1. _ 2. Time Complexity 3. Space Complexity

Correctness

_ are values or set of values.

Data

_ _ defines a particular data with the following characteristics: 1. Atomic − Definition should define a single concept. 2. Traceable − Definition should be able to be mapped to some data element. 3. Accurate − Definition should be unambiguous. 4. Clear and Concise − Definition should be understandable.

Data Definition

A _ _ refers to a single unit of values.

Data Item

a _ _ represents an object having a data.

Data Object

What are three common problems applications face? 1. _ _ 2. Processor Speed 3. Multiple Requests

Data Search

_ _ are a systematic way to organize data in order to use it efficiently.

Data Structures

_ _ solves the following three problems: 1. Data Search 2. Processor Speed 3. Multiple Requests

Data Structures

A _ _ is a way to classify various types of data such as integer, string, etc. which determines the values that can be used with the corresponding type of data, the type of operations that can be performed on the corresponding type of data.

Data Type

A sequence of values is said to be in _ Order, if the successive element is less than the current one. For example: 9, 8, 6, 4, 3, 1.

Decreasing

The 5 important categories of algorithms are: 1. Search 2. Sort 3. Insert 4. Update 5. _

Delete

Deleteing an element at the given index of an array is called _.

Deletion

The basic operations on data structures are: 1. Traversing 2. Searching 3. Insertion 4. _ 5. Sorting 6. Merging

Deletion

The two types of Data Types are: 1. Built-in Data Types 2. _ Data Types

Derived

Those data types which are implementation independent as they can be implemented in one or the other way are known as _ Data Types. These Data Types are normally built by the combination of primary or built-in data types and associated operations on them. For example: 1. List 2. Array 3. Stack 4. QueueT

Derived

Types of Linked Lists: 1. Simple Linked List 2. _ Linked List 3. Circular Linked List

Doubly

_ linked list, items can be navigated forward and backward.

Doubly

Each item stored in an array is called an _.

Element

Data items that cannot be divided are called _ _.

Elementary Items

An _ is that which contains certain attributes or properties, which may be assigned values

Entity

Entities of similar attributes form an _ _.

Entity Set

In some sorting algorithms, the program requires space which is more than or equal to the elements being sorted. Sorting which uses equal or more space is called _ Sorting. Merge-Sort is an example of this.

Not-In-Place / Not In-Place / Not-In Place / Not In Place

The last link in a linked list carries a link as _ to mark the end of the list.

Null

Common Asymptotic Notations constant - _

O(1)

Common Asymptotic Notations logarithmic - _

O(log n) / O(logn) / O(log(n))

Common Asymptotic Notations n log n − _

O(n log n) / O(n logn) / O(nlogn) / O(n log(n)) / O(nlog(n))

Common Asymptotic Notations linear - _

O(n)

Common Asymptotic Notations quadratic − _

O(n^2)

Common Asymptotic Notations cubic − _

O(n^3)

What are three common problems applications face? 1. Data Search 2. _ _ 3. Multiple Requests

Processor Speed

A _ is a collection of field values of a given entity.

Record

The 5 important categories of algorithms are: 1. _ 2. Sort 3. Insert 4. Update 5. Delete

Search

To find an element in an array, you _ using the given index or by the value in an array.

Search

The basic operations on data structures are: 1. Traversing 2. _ 3. Insertion 4. Deletion 5. Sorting 6. Merging

Searching

_ sort is an in-place comparison-based algorithm in which the list is divided into two parts, the sorted part at the left end and the unsorted part at the right end. Initially, the sorted part is empty and the unsorted part is the entire list. The smallest element is selected from the unsorted array and swapped with the leftmost element, and that element becomes a part of the sorted array. This process continues moving unsorted array boundary by one element to the right. This algorithm is not suitable for large data sets as its average and worst case complexities are of Ο(n^2), where n is the number of items.

Selection

public void _(int[] list) { · int length = list.length; · · for (int i = 0; i < length - 1; i++) · { · · int minIndex = minIndex(array, i); · · swap(list[i], list[i + 1]); · } } public int minIndex(int[] list, int startIndex) { · int length = list.length; · int minIndex = startIndex; · · for (int i = 0; i < length; i++) · { · · if (list[i] < list[minIndex]) · · { · · · minIndex = i; · · } · } · · return minIndex; }

SelectionSort / Selection Sort / Selection_Sort

In a _ linked list, navigation is forward only.

Simple

Types of Linked Lists: 1. _ Linked List 2. Doubly Linked List 3. Circular Linked List

Simple

The 5 important categories of algorithms are: 1. Search 2. _ 3. Insert 4. Update 5. Delete

Sort

A _ algorithm specifies the way to arrange data in a particular order.

Sorting

The basic operations on data structures are: 1. Traversing 2. Searching 3. Insertion 4. Deletion 5. _ 6. Merging

Sorting

Characteristics of Data Structures: 1. Correctness 2. Time Complexity 3. _ _

Space Complexity

If a sorting algorithm, after sorting the contents, does not change the sequence of similar content in which they appear, it is called _ Sorting.

Stable

Big Oh Notation, Ο The notation Ο(n) is the formal way to express the upper bound of an algorithm's running time. It measures the _ case time complexity or the longest amount of time an algorithm can possibly take to complete.

Worst

Common Asymptotic Notations polynomial − _

n^Ο(1)


Set pelajaran terkait

Chapter 1: Check Your Understanding (Laws and Business)

View Set

4 - Life Insurance Premiums, Proceeds and Beneficiaries

View Set

Marketing Ch. 16 PRACTICE QUESTIONS

View Set

Parallel Lines Cut by a Transversal Quiz

View Set