Data Structures vs Algorthims Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What is a data structure?

A

A way to organise and store data efficiently.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Name a few data structures:

A

Arrays
Linked list
Stacks
Queues
Trees
Graphs
Hash Tables

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is an algorithm?

A

A finite sequence of instructions used to solve a problem.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Why is an algorithm used?

A

To manipulate data in the form of searching, sorting etc.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How does the choice of data structures affect the performance of algorithms?

A

Different data structures provide varying levels of efficieny for basic operations.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What does a sorting algorithm do and what types are there?

A

Used to arrange data in a specific order:

Quick sort
Merge sort
Bubble sort
Heap sort

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What does a searching algorithm do and what types are there?

A

Used to find an element within a data structure:

Binary search
Linear search

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What does a divide and conquer algorithms are there?

A

Merge sort
Quick sort

How well did you know this?
1
Not at all
2
3
4
5
Perfectly