computer science unit 2.3

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

1/7

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 10:38 PM on 8/21/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

8 Terms

1
New cards

linear search

  • an algorithm that traverses through every item

  • one at a time

  • until it finds the item its searching for


<ul><li><p>an algorithm that traverses through every item </p></li><li><p>one at a time </p></li><li><p>until it finds the item its searching for </p></li></ul><p></p>
2
New cards

binary search

  • algorithm which uses a divide and conquer algorithm

  • splits the list in half


<ul><li><p>algorithm which uses a divide and conquer algorithm </p></li><li><p>splits the list in half </p></li></ul><p></p>
3
New cards

bubble sort

  • passes through the list evaluating

  • pairs of item


4
New cards

stacks

  • LIFO structure

  • implemented as an array

  • use a single pointer, points to the element currently at the top

  • top pointer initialised at -1 (first element would be 0)


5
New cards

different algorithms for stacks?


<p></p>
6
New cards

size()

  • returns the number of elements

  • in the stack

  • (returns the value of top pointer +1)


<ul><li><p>returns the number of elements </p></li><li><p>in the stack </p></li><li><p>(returns the value of top pointer +1)</p></li></ul><p></p>
7
New cards

isEmpty()

  • (checks if stack is empty)

  • checks if top pointer is less than 0 = empty stack


<ul><li><p>(checks if stack is empty)</p></li><li><p>checks if top pointer is less than 0 = empty stack </p></li></ul><p></p>
8
New cards

peek()