Study guide

5.5 Software Engineering & Algorithms

FE Electrical and Computer Exam Exam

Track your progress as you read

Finished sections get a check mark.

1 FE Electrical & Computer: Exam Map, Handbook & Strategy

1.1 Current Exam Facts 1.2 CBT Format & Scaled Scoring 1.3 The FE Reference Handbook 1.4 Approved Calculators & Test-Day Logistics 1.5 Study Plan & Time Strategy

2 Mathematics, Economics & Ethics

2.1 Algebra, Calculus & Differential Equations 2.2 Complex Numbers & Laplace Transforms 2.3 Probability & Statistics 2.4 Engineering Economics 2.5 Ethics & Professional Practice

3 Circuits, Electronics & Electromagnetics

3.1 DC Circuit Analysis 3.2 AC Steady-State & Phasors 3.3 Transient Response (RL, RC, RLC) 3.4 Electronics & Devices 3.5 Electromagnetics

4 Signals, Systems, Controls & Communications

4.1 Linear Systems & Transfer Functions 4.2 Signal Processing & Sampling 4.3 Control Systems 4.4 Communications

5 Digital Systems, Computers, Networks & Software

5.1 Number Systems & Boolean Algebra 5.2 Combinational & Sequential Logic 5.3 Computer Architecture & Microprocessors 5.4 Computer Networks 5.5 Software Engineering & Algorithms

6 Power, Materials & Final Readiness

6.1 Power Fundamentals & Three-Phase 6.2 Transformers & Rotating Machines 6.3 Power Electronics & Transmission 6.4 Properties of Electrical Materials & Engineering Sciences 6.5 Integrated Practice & Final Readiness

5.5 Software Engineering & Algorithms

Key Takeaways Explain This Topic AI

Big-O describes worst-case growth: binary search is O(log n), a linear scan is O(n), and a simple nested-loop sort is O(n^2).

Arrays give O(1) indexed access but O(n) middle insertion; linked lists give O(1) insertion at a known node but O(n) search.

Stacks are last-in-first-out (LIFO); queues are first-in-first-out (FIFO).

Binary search requires a sorted array and halves the search space each step, reaching O(log n) comparisons.

Waterfall moves linearly through SDLC phases; Agile delivers working software in short iterative sprints.

Last updated: June 2026

Data structures

A data structure organizes data so a program can access and modify it efficiently; the FE expects you to know each one's access trade-offs.

Array: contiguous, fixed-size; O(1) access by index, but inserting or deleting in the middle is O(n) because elements shift.

Linked list: nodes joined by pointers; O(1) insertion or deletion at a known node, but O(n) to search because you must traverse.

Stack: LIFO (last-in, first-out); push and pop at one end. Used for function-call management (the call stack) and expression evaluation.

Queue: FIFO (first-in, first-out); enqueue at the rear, dequeue at the front. Used for buffering and scheduling.

Hash table: maps keys to values with average O(1) lookup via a hash function; collisions degrade it toward O(n).

Tree: hierarchical; a balanced binary search tree supports O(log n) search, insert, and delete, while a graph models arbitrary relationships.

The FE tests you on choosing the right structure for an access pattern: use a stack to reverse order or to evaluate nested expressions and undo operations, a queue for first-come-first-served scheduling and buffering, a hash table when you need fast keyed lookup, and a tree when you need ordered data with fast search. Picking the wrong structure turns an O(1) or O(log n) operation into an O(n) one - the usual point of the question.

Big-O complexity

Big-O notation expresses how an algorithm's running time or memory grows as the input size n grows, keeping only the dominant term and dropping constants. It is the worst-case asymptotic bound - what matters when inputs get large. The ordering from best to worst is:

O(1) < O(log n) < O(n) < O(n log n) < O(n^2) < O(2^n) < O(n!)

O(1) does not depend on n, O(log n) halves the problem each step, O(n) touches each element once, O(n log n) is the bound of efficient comparison sorts, and O(n^2) appears in nested loops over the same data.

Worked trace: a doubly nested loop, for i in 1..n { for j in 1..n {...} } , runs the inner body n x n = n^2 times, so it is O(n^2); a single loop that halves a counter each pass (i = i/2) runs about log2(n) times, so it is O(log n).

Big-O of common operations

  • Algorithm / Operation Average Big-O Notes
  • Array access by index O(1) Direct addressing
  • Linear search O(n) Unsorted data
  • Binary search O(log n) Requires sorted data
  • Bubble / insertion / selection sort O(n^2) Simple, nested loops
  • Merge sort / quicksort O(n log n) Efficient comparison sorts
  • Hash-table lookup O(1) Average; O(n) worst case
  • Balanced BST search O(log n) Self-balancing tree

Quicksort degrades to O(n^2) in its worst case (already-sorted input with poor pivots), while merge sort guarantees O(n log n) and is stable - a frequent exam nuance.