• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/15

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

15 Cards in this Set

  • Front
  • Back

What is a data structure?

A data structure is the way the data is organized and used for retrieval and acces

Describe the types of data structures

Lists: a collection of related things linked to the previous or following item


Arrays: a collection of values that are all the same


Trees: a data structure that organizes data in a hierarchical framework.


Tables: data saved in the form of rows and columns

What is a Linear Data Structure? Name a few examples

A data structure is linear if all its elements or data items are arranged in a sequence or linear order.


Examples: arrays, stacks, strings, queue, and linked lists

What is the difference between file structure and storage structure?

The difference is the memory area accessed. Storage structure refers to the data structure in the memory of the computer system, whereas file structure represents the storage structure in the auxiliary memory.

What is a multidimensional array?

It is an array that has multiple dimensions. An example would be the 2-dimensional array, or an array of arrays. Giving it a row and column feel.

What are some applications of data structures?

Numerical analysis - numeric approximation


Operating system - managing memory


Graphics - used to represent and render images and other graphics

What is a linked list?*

It’s a linear Data Structure whose elements use pointers to form a chain of elements. Each element is a separate object called a node with two items: a data field and a reference to the next node. The entry point or head is the entry point of the list and the last node has a reference to null.


It is a dynamic data structure and is commonly used when we need to deal with an unknown number of objects, we need constant insertions/deletions, or when we need to insert items in the middle of the list as in a priority queue.

Are linked lists considered linear or non-linear Data Structures?

Linear because they are stored in sequential order and each element points to the next

Advantages of a linked list over an array? In which scenarios do we use linked list and when array?*

Linked List advantages


Insertion and deletion: less expensive with a linked list


Dynamic data structure: linked list is more dynamic than an array as it can shrink and grow at runtime by allocating and de-allocating memory. This way there is no wasted memory as there is in an array.


When to use:


Linked list: stacks and queues - add/remove is easier, can insert items in the middle


Array: randomly access elements, we know the number of elements in the array beforehand

What is a doubly-linked list?

It is a complex type of linked list in which a node has two links, one that connects the next node, and one that connects to the previous node. This allows for traversal forward and backwards.


Example: music playlist (skipping forward and backward)

What are dynamic data structures? Name a few.

They are collections of data in memory that grow or shrink in size as a program runs.


Array, linked list, stack, queue, heap

What is an algorithm?

Step by step method of solving a problem or manipulating data.

Why do we need to do an algorithm analysis?

It provides an estimation of the amount of resources needed to solve a specific problem. Because problems can be solved in a bunch of ways we want to find the best way to solve it properly

What is a stack?

A stack is an abstract data type that specifies a linear data structure. As with a stack of something in real life you can only really take something off the top: LIFO (last in first out)

What are the operations that can be performed on a stack?

Push: inserts a new element at the top of the stack


Pop: the pop operation is performed to remove the stack’s topmost element


Peek: returns value of the topmost element without removing it