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 23 people
680 days ago
5.0(1)
note Note
studied byStudied by 5220 people
688 days ago
4.6(34)
note Note
studied byStudied by 2 people
16 days ago
5.0(1)
note Note
studied byStudied by 9 people
684 days ago
5.0(2)
note Note
studied byStudied by 8 people
1019 days ago
5.0(1)
note Note
studied byStudied by 16 people
448 days ago
5.0(1)
note Note
studied byStudied by 42 people
84 days ago
5.0(1)
note Note
studied byStudied by 3 people
126 days ago
5.0(1)

Explore top flashcards

flashcards Flashcard (75)
studied byStudied by 8 people
319 days ago
5.0(1)
flashcards Flashcard (69)
studied byStudied by 37 people
80 days ago
5.0(2)
flashcards Flashcard (114)
studied byStudied by 9 people
673 days ago
5.0(1)
flashcards Flashcard (51)
studied byStudied by 4 people
665 days ago
5.0(1)
flashcards Flashcard (35)
studied byStudied by 18 people
117 days ago
4.5(2)
flashcards Flashcard (159)
studied byStudied by 5 people
769 days ago
5.0(1)
flashcards Flashcard (88)
studied byStudied by 9 people
531 days ago
4.0(1)
flashcards Flashcard (24)
studied byStudied by 38 people
1 day ago
5.0(1)
robot