Back to marketplace

2021 p1

No description yet. This curated deck is ready for daily study.

Total cards: 10•Content version: v4•Public deck•Updated: 8/1/2026

Card preview (10)

#1
Front (Question)

358164 bubble sort this into first second and 3rd pass

Back (Answer)

first: 351648 second: 315468 third: 134568

#2
Front (Question)

define binary tree

Back (Answer)

a rooted tree where each node has at most two child nodes

#3
Front (Question)

state the output for in-order transversal for E, H, I, Y, Q, B, C.

Back (Answer)

EIHCYBQ

#4
Front (Question)

recursive subroutine

Back (Answer)

s subroutine that calls itself

#5
Front (Question)

two components of a stack frame

Back (Answer)

local variables and parameters

#6
Front (Question)

procedural decomposition

Back (Answer)

breaking a problem into smaller sub-problems

#7
Front (Question)

steps in adding a record to a hash table

Back (Answer)

• apply hash function to calculate the hash value for the key . • use the hash value to find the index in the hash table so that the new record could be stored. • check if there is a record at the index. if yes, use a collision resolution technique. • insert the new record at the index in the hash table and update the number of records in the hash table.

#8
Front (Question)

two advantages of RPN

Back (Answer)

easier for a computer to analyse don’t need brackets so you don’t have to keep track of parentheses

#9
Front (Question)

how can a single stack be used to evaluate an RPN expression

Back (Answer)

• initialize an empty stack • push values onto a stack from left hand side. 3.for each number in the expression; push it onto a stack. for each operator; pop the top two numbers off the stack. • after both have been processed, the stack should contain only one value, which is the result of the expression.

#10
Front (Question)

base case for a recursive sub routine

Back (Answer)

a scenario where a recursive subroutine does’nt call itself