Skip to content

Array algorithms: max, count, search, average · ⁨数组算法:最大值、计数、查找、平均值⁩

English

Common array jobs

  • Some array tasks come up again and again: find the sum, the biggest, the smallest, or count items.
  • Each one uses the same idea: start with a guess, then loop and update it.
  • These patterns appear all the time on the AP CSA exam.
中文

常见的数组任务

  • 有些数组任务一次又一次地出现:求和、求最大值、求最小值,或计数。
  • 每一个都用同一个思路:先给一个初始猜测,然后循环并不断更新它。
  • 这些模式在 AP CSA 考试里经常出现。

Handout

Log in or create account · ⁨登录或创建账户⁩

IGCSE, A-Level · ⁨IGCSE、A-Level⁩ & AP · ⁨与 AP⁩