返回卡包市场

Algorithms and programs

暂无描述。系统推荐的高质量记忆内容,适合每天坚持背诵学习。

卡片总数: 15内容版本: v4公开卡包更新时间: 8/1/2026

卡片预览 (15 张)

#1
正面 (问题)

what is an algorithm?

背面 (解答)

set of sequential steps that are followed in order to complete a task.

#2
正面 (问题)

how can you represent an algorithm?

背面 (解答)

pseudocode flowcharts

#3
正面 (问题)

what is a variable?

背面 (解答)

named location in the computer’s memory that a programmer can use to store data whilst the program is running.

#4
正面 (问题)

what is the scope of a variable?

背面 (解答)

the time that a variable is accessible and if it is local or global

#5
正面 (问题)

how to make your code understandable to other programmers?

背面 (解答)

self-documenting identifiers, annotation and program layout

#6
正面 (问题)

function vs procedure

背面 (解答)

function is a subroutine that returns a value while a procedure is a subroutine that doesn’t

#7
正面 (问题)

passing a parameter by value

背面 (解答)

a copy of the data is passed into the procedure and cannot be altered - avoids accidental value changes

#8
正面 (问题)

passing a parameter by reference

背面 (解答)

a copy of the memory address is passed into the procedure - data in the calling environment can be changed by the subroutine.

#9
正面 (问题)

recursive function

背面 (解答)

calls itself until a base case is met - allows the same operation to be carried out a number of times.

#10
正面 (问题)

key validation checks

背面 (解答)

type check - correct data type length check range check - numeric values within certain range format check - data conforms to set of rules existence check check digit

#11
正面 (问题)

typical answer to big O of storage

背面 (解答)

O(1)

#12
正面 (问题)

pros of linear search

背面 (解答)

easy to program fast with small data sets data doesn’t need to be sorted

#13
正面 (问题)

linear search cons

背面 (解答)

not efficient if item at the end of the array very slow with large data sets

#14
正面 (问题)

binary search pros

背面 (解答)

fast for large set of numbers divide and conquer so adding large numbers doesn’t incrementally increase search time

#15
正面 (问题)

binary search cons

背面 (解答)

data must be sorted more complex to program