IB Computer Science HL Paper 1 Topic 5

studied byStudied by 4 people
0.0(0)
Get a hint
Hint

Recursion

1 / 14

15 Terms

1

Recursion

  • A method that calls itself

  • Involves the use of stacks to store data that will be returned at end

  • Can be memory intensive if many recursive calls are made

New cards
2

Characteristics of a stack

  • A data structure

  • LIFO

  • dynamic

New cards
3

Stack access methods

  • push()

  • pop()

  • isEmpty()

New cards
4

Characteristics of a queue

  • FIFO

  • dynamic

New cards
5

Queue access methods

  • enqueue()

  • dequeue()

  • isEmpty()

New cards
6

Real world examples of queues

  • Printer queues

  • Computer modelling of real-life queues (like in supermarkets)

New cards
7

Linked lists

  • Linear collection of nodes, which are self-referential

  • Nodes connected by pointer links

New cards
8

Features of a doubly linked list

  • Single head, single tail

  • Each node has two pointers - one to next, one to previous

<ul><li><p>Single head, single tail</p></li><li><p>Each node has two pointers - one to next, one to previous</p></li></ul>
New cards
9

Features of a circular linked list

  • Single head

  • One pointer for each element

  • Last element’s pointer points to head

New cards
10

Binary trees

knowt flashcard image
New cards
11

Parent

  • A node in a tree that has children (left, right or both)

New cards
12

Root

  • The top node in a tree

New cards
13

Subtree

  • A parent with children within another parent-child relationship

New cards
14

Dynamic data structures pros and cons

Pros

  • Can change size while program is running

  • Makes efficient use of memory

  • Storage no longer required can be returned to the system for other use

Cons

  • Difficult to program

  • Can be slow / complex to implement

  • A linked list only allows serial (in order) search

New cards
15

Static data structures pros and cons

Pros

  • Easy to program

  • Easy to check for overflow

  • An array allows random access

  • Does not change in size while program is running

Cons

  • Can waste space

  • Programmer has to estimate space needed, could be wrong

New cards

Explore top notes

note Note
studied byStudied by 6 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 11 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 11 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 57 people
Updated ... ago
5.0 Stars(3)
note Note
studied byStudied by 18 people
Updated ... ago
5.0 Stars(2)
note Note
studied byStudied by 9 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 8 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 1418 people
Updated ... ago
4.8 Stars(25)

Explore top flashcards

flashcards Flashcard29 terms
studied byStudied by 297 people
Updated ... ago
4.5 Stars(10)
flashcards Flashcard50 terms
studied byStudied by 8 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard80 terms
studied byStudied by 6 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard21 terms
studied byStudied by 2 people
Updated ... ago
5.0 Stars(2)
flashcards Flashcard144 terms
studied byStudied by 12 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard47 terms
studied byStudied by 9 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard49 terms
studied byStudied by 82 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard146 terms
studied byStudied by 10 people
Updated ... ago
5.0 Stars(1)