Computer science paper 2

0.0(0)
studied byStudied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/8

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 12:48 PM on 2/4/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

9 Terms

1
New cards
<p>What is an array?</p>

What is an array?

An array is a data structure consisting of a collection of elements, each identified by an index or key. It is holds multiple pieces of data contiguously (in a row) and is stored in main memory. Its values are mutable and the values can be changed during runtime. It can be a static data structure its length can’t change during run time.

2
New cards

Pros of an array

Good for storing many types of related data. Fast access of data with index. Memory efficient. Simple to implement.

3
New cards

Cons of an array

You can’t alter the arrays length during runtime. Can only store one kind of data.

4
New cards

What is a tuple?

An ordered sequence of elements. Completely immutable. Can be different data types. Used to group and organise data items.

5
New cards

Pros of a tuple.

Faster than lists and arrays. memory efficient. Prevents web modification making it unchangeable and so can’t be accidentally changed.

6
New cards

Cons of a tuple.

Can’t be modified, you would need to create a new tuple to update the list.

7
New cards

Definition of a stack.

Holds a sequence of items in an ordered list. LIFO. You can only access data on the top position of the list, (using pop(), push()).

8
New cards
9
New cards