IB Computer Science HL Paper 1 Topic 5

studied byStudied by 5 people
0.0(0)
learn
LearnA personalized and smart learning plan
exam
Practice TestTake a test on your terms and definitions
spaced repetition
Spaced RepetitionScientifically backed study method
heart puzzle
Matching GameHow quick can you match all your cards?
flashcards
FlashcardsStudy terms and definitions

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 2 people
721 days ago
5.0(1)
note Note
studied byStudied by 115 people
5 days ago
5.0(1)
note Note
studied byStudied by 152 people
650 days ago
4.4(5)
note Note
studied byStudied by 2 people
92 days ago
5.0(1)
note Note
studied byStudied by 23 people
929 days ago
5.0(1)
note Note
studied byStudied by 84 people
276 days ago
5.0(2)
note Note
studied byStudied by 12 people
333 days ago
5.0(2)
note Note
studied byStudied by 90 people
738 days ago
4.0(1)

Explore top flashcards

flashcards Flashcard (100)
studied byStudied by 2 people
673 days ago
5.0(1)
flashcards Flashcard (104)
studied byStudied by 11 people
780 days ago
5.0(2)
flashcards Flashcard (20)
studied byStudied by 9 people
420 days ago
5.0(1)
flashcards Flashcard (84)
studied byStudied by 15 people
723 days ago
5.0(2)
flashcards Flashcard (35)
studied byStudied by 7 people
712 days ago
5.0(1)
flashcards Flashcard (28)
studied byStudied by 1 person
617 days ago
5.0(1)
flashcards Flashcard (148)
studied byStudied by 1 person
1 day ago
5.0(1)
flashcards Flashcard (21)
studied byStudied by 1 person
10 days ago
5.0(1)
robot