Instiq
Chapter 3 · Technology·v1.0.0·Updated 7/16/2026·~13 min

What's changed: Initial version

3.2Algorithms and Programming

Key points

Learn how to represent processing steps with flowcharts, ways of holding data (data structures) such as arrays, lists, last-in-first-out stacks, first-in-first-out queues, and hierarchical trees, search algorithms for finding data and sorting algorithms for ordering it, computational complexity as a measure of efficiency, and programming languages, markup languages (HTML, XML), APIs, and low-code development.

A program is essentially a procedure: what to process, and in what order. This procedure is called an algorithm. Visualizing it with a flowchart, choosing an effective way to hold data (a data structure), and combining efficient search and sort techniques all let a computer do the job you intend.

3.2.1Flowcharts and data structures

  • A flowchart represents the order of processing using arrows and symbols (start/end, process boxes, decision diamonds, etc.). It is used to organize the steps before writing code.
  • An array stores data of the same kind in consecutive slots, accessible directly by an index number. A list links pieces of data together, and is well suited to inserting or removing items in the middle.
  • A stack retrieves the most recently added item first (LIFO: Last In First Out—like a stack of plates). A queue retrieves the earliest added item first (FIFO: First In First Out—like a line at a counter). A tree links data hierarchically through parent-child relationships (such as folder hierarchies).

3.2.2Search/sort algorithms, complexity, and languages/APIs

  • A search algorithm is a procedure for finding target data—for example, linear search (checking from the start) or binary search (repeatedly halving the search range; the data must already be sorted). A sort algorithm is a procedure for arranging data in ascending or descending order.
  • Computational complexity measures the effort (time or memory) a process requires as a function of input size, expressing how much processing time grows as the number of data items increases. Among algorithms producing the same result, lower complexity is more efficient. Binary search is more efficient than linear search once the number of items is large.
  • A programming language (Python, Java, etc.) is used to write instructions for a computer. A markup language specifies a document's structure or appearance. HTML describes the structure of a web page; XML represents data meaning with freely defined tags and is used for tasks such as data interchange.
  • An API (Application Programming Interface) is an interface that lets one piece of software call and use the functionality of another. Low-code (or no-code) development builds screens and processing logic by assembling pre-built parts, writing little or no code—making it easier for people with less specialized knowledge to participate in development.
Exam point

The staples: stack = LIFO, queue = FIFO; binary search requires sorted data and is more efficient than linear search; lower computational complexity means better efficiency; HTML describes structure, XML is for data interchange; an API is the interface for calling another piece of software's functionality. Questions on the meaning of flowchart symbols (process, decision) are also classic.

Consider building a system for a service counter to see how these elements connect. First, you draw a flowchart to organize the steps—"issue a ticket number -> wait in line -> call the number -> serve the customer"—using start/end symbols and decision diamonds for branching. The "wait in line" part must serve earlier arrivals first, so a queue (FIFO) data structure fits. Conversely, an "undo" feature that cancels the most recent action must cancel the last operation first, so a stack (LIFO) is used there. To instantly look up a checked-in customer's name from a counter number, an array (direct access by index) works well; to flexibly insert or remove entries when someone cancels mid-queue, a list is easier to work with. For a small counter handling only a few requests a day, a linear search through names from the start is practical, but to find one record among millions of nationwide customer records, using a binary search on pre-sorted data—repeatedly halving the range—greatly reduces computational complexity and shortens response time. The web screen for this system is structured with HTML, and if you want to call another company's map service to show a store's location, you use the API that service provides. In recent years, low-code tools have also become popular, letting people who are not professional programmers build such business applications by assembling parts on screen.

StructureOrder of accessEveryday analogy
Stack (LIFO)Last in, first outStack of plates / undo
Queue (FIFO)First in, first outLine at a counter
TreeTraversed via parent-child hierarchyFolder hierarchy
Warning

Trap: "A stack retrieves the first item added, first" is wrong—first-in-first-out (FIFO) is the property of a queue; a stack is the opposite, last-in-first-out (LIFO). Also, "binary search works directly on unsorted data" is wrong—binary search requires the data to already be sorted; applying it to unsorted data does not produce correct results.

Algorithms: data structures, search/sort, languages.
Stack = LIFO; queue = FIFO

3.2.3Section summary

  • Flowcharts visualize procedures. Stack = LIFO; queue = FIFO. A tree is hierarchical
  • Binary search requires sorted data and is more efficient than linear search. Lower computational complexity is better
  • HTML describes structure; XML is for data interchange. An API is the interface for calling other software; low-code builds with minimal code

Sign in to track progress — Log in.

Quick check

(just a quick review)

Q1. You want to implement an "undo" feature that cancels the most recent operations one at a time. Which data structure best fits this purpose?

Q2. You want to efficiently find one specific record among 1,000,000 records that are already sorted in ascending order. Which search method is most suitable?

Q3. You want to embed a map-display feature from another company's map service into your own website by calling it from your code. What mechanism is most appropriate for this?

Check your understandingPractice questions for Chapter 3: Technology