Software Engineering is 4-6 questions on the FE Electrical exam. It tests reading rather than writing code: the complexity of an algorithm, the cost of an operation on a data structure, and the output of a short piece of pseudocode.
Candidates who have not programmed recently should practise tracing loops by hand with a table of variable values, because that is the format of most implementation questions.
Exam weight: NCEES lists Software Engineering at 4-6 questions of the 110-question FE Electrical and Computer exam. Work each problem below on paper first, then reveal the worked solution — reading a solution you have not attempted builds recognition, not recall.
What NCEES Tests in Software Engineering
The specification lists algorithms (sorting, searching, complexity, big-O), data structures (lists, trees, vectors, structures, arrays) and software implementation (iteration, conditionals, recursion, control flow, scripting, testing).
The specification lists algorithms (sorting, searching, complexity, Big-O), data structures (lists, trees, vectors, structures, arrays) and software implementation (iteration, conditionals, recursion, control flow, scripting, testing).
Expect the Big-O class of a nested loop, the number of comparisons of a binary search, the complexity of the common sorts, the right structure for a stated access pattern, the traversal order of a tree, the output of a pseudocode fragment, the base case of a recursion, and the level or kind of a test.
5 Free Software Engineering Practice Problems
Each software engineering problem below comes from the FEExamClick FE Electrical question bank, with worked solutions that cite the FE Reference Handbook page, and matches the style, difficulty and format of the real exam. Attempt each one under a three-minute limit — roughly the pace the exam demands.
Problem 1 — C. Software implementation (iteration, conditionals, recursion, control flow, scripting, testing)
What is the value of sum after the following loop finishes?
sum = 0
for i = 1 to 5
sum = sum + i
end for
Answer: C) 15
The loop variable takes the values 1, 2, 3, 4, 5 in turn - a 'for ... to' loop in the exam's pseudocode includes both end values - and each is added to the running total:
$$0 \to 1 \to 3 \to 6 \to 10 \to 15$$
That is \(1 + 2 + 3 + 4 + 5 = 15\), or in closed form \(n(n+1)/2\) with \(n = 5\). The accumulator pattern - initialise to zero, add inside the loop - is the most common loop there is, and the two things to check are that the total starts at 0 and that the last value of \(i\) is really included.
10 is the sum through 4, the last iteration dropped - the result of reading 'to 5' as 'while less than 5'.
5 is the final value of \(i\) itself, mistaken for the sum.
20 is one extra term, as if the loop ran to 6 and then stopped short, or \(4 \times 5\) from a misremembered formula.
Problem 2 — A. Algorithms (sorting, searching, complexity, big-O)
An algorithm runs in \(O(n^2)\) time. If the input size doubles, by roughly what factor does its running time increase?
Answer: B) 4
Quadratic time means the running time is proportional to the square of the input size. Doubling the input squares the doubling:
$$\dfrac{T(2n)}{T(n)} = \dfrac{c(2n)^2}{cn^2} = \dfrac{4cn^2}{cn^2} = 4$$
The constant \(c\) cancels, and so does \(n\): for any polynomial the ratio is the same whatever the starting size, which is exactly why Big O is useful. It tells you how an algorithm scales without knowing how fast the machine is. The rule generalises: an \(O(n^k)\) algorithm slows by \(2^k\) when the input doubles, so the exponent is the whole story.
2 is the linear answer, \(O(n)\): doubling the input doubles the work. A quadratic algorithm does worse than that because every element interacts with every other.
8 is \(2^3\), the factor for a cubic algorithm.
16 is \(2^4\), or equivalently the factor of 4 squared a second time - the doubling applied to the exponent as well as to the input.
Problem 3 — B. Data structures (lists, trees, vectors, structures, arrays)
The figure shows a binary search tree (BST) with root 20. If the value 14 is inserted into this BST, where is the new node placed?
Answer: A) Right child of node 12
Handbook: FE Reference Handbook 10.6, Software Engineering → Data Structures, p. 416 (PDF viewer: page 421) defines a tree and notes that "a binary tree is a specialized case where each parent node can have no more than two children nodes." The Handbook does not state the ordering rule that makes a binary tree a binary search tree, so do not spend exam time looking for it: in a BST every value in a node's left sub-tree is smaller than the node and every value in its right sub-tree is larger. Insertion follows that rule down from the root until it reaches an empty child slot.
Step 1 – Descend from the root.
At 20: \(14 < 20\) → go left, to 10.
At 10: \(14 > 10\) → go right, to 12.
At 12: \(14 > 12\) → go right. Node 12 has no right child, so the descent stops here.
Step 2 – Place the node: 14 becomes the right child of 12. Check the result: 14 sits in 10's right sub-tree (all values there must exceed 10 — true) and in 20's left sub-tree (all values there must be below 20 — true).
Step 3 – Eliminate the distractors:
(B) Left child of 22 is where you land by reversing the very first comparison: treating 14 as greater than 20 sends the search right to 30, then left to 25, then left to 22, then left again. Every later step is correct — only the root comparison was wrong.
(C) Right child of 10 stops one level too early. That position is not empty; it already holds 12, and the search must continue past it.
(D) Left child of 12 would require \(14 < 12\). That slot is reserved for values between 10 and 12.
Step 4 – Answer: The correct answer is (A) Right child of node 12.
Cost: the insertion took three comparisons, one per level. That is why the Handbook's Big-O table on p. 417 lists a Binary Search Tree as \(O(\log n)\) on average — and \(O(n)\) in the worst case, when the tree degenerates into a chain.
Problem 4 — B. Data structures (lists, trees, vectors, structures, arrays)
A hash table has 10 slots, indexed 0 to 9, and uses the hash function \(h(k) = k \bmod 10\). Collisions are resolved by linear probing: if the home slot is occupied, the next higher index is tried, and so on, until an empty slot is found. The keys 25, 35, 45 and 15 are inserted in that order. In which slot does key 15 end up?
Answer: D) 8
All four keys end in 5, so all four hash to the same home slot, and linear probing has to find each one a new place:
\(h(25) = 5\), slot 5 is free: 25 goes in slot 5.
\(h(35) = 5\), slot 5 is taken; probe 6, free: 35 goes in slot 6.
\(h(45) = 5\), slots 5 and 6 are taken; probe 7, free: 45 goes in slot 7.
\(h(15) = 5\), slots 5, 6 and 7 are taken; probe 8, free: 15 goes in slot 8.
The Handbook describes the hash table as an array of buckets or slots that the hash function indexes into; what happens on a collision is up to the implementation, and this one keeps walking forward. The example shows the weakness of that choice: the four colliding keys have formed a run of occupied slots, and any later key hashing to 5, 6, 7 or 8 will have to walk past all of them. That growth of runs is called primary clustering, and it is why probing tables are kept well under full.
5 is the home slot, the answer if collisions were ignored - but a slot holds one key, and 25 is already there.
6 and 7 are where the probe sequence stops for 35 and 45 respectively; a candidate who stops probing after the first or second occupied slot lands on one of them. Key 15 arrives last and has to pass all three.
Problem 5 — C. Software implementation (iteration, conditionals, recursion, control flow, scripting, testing)
The figure shows a flowchart for a recursive algorithm. What value does gcd(48, 18) return?
Answer: D) 6
Handbook: FE Reference Handbook 10.6, Software Engineering → Flow Chart Definition, p. 418 (PDF viewer: page 423), for the symbols: rounded box = start or stop point, rectangle = process/operation, diamond = decision. The Euclidean algorithm itself does not appear anywhere in the Handbook, so the flowchart is the complete specification — do not spend exam time searching for a gcd formula.
Step 1 – Read the function. If \(b = 0\) the function returns \(a\). Otherwise it computes the remainder \(r = a \bmod b\), calls itself as \(\text{gcd}(b, r)\), and returns whatever that call returns.
Step 2 – Descend through the calls:
\(\text{gcd}(48, 18)\): \(b \neq 0\), \(r = 48 \bmod 18 = 12\) → call \(\text{gcd}(18, 12)\)
\(\text{gcd}(18, 12)\): \(b \neq 0\), \(r = 18 \bmod 12 = 6\) → call \(\text{gcd}(12, 6)\)
\(\text{gcd}(12, 6)\): \(b \neq 0\), \(r = 12 \bmod 6 = 0\) → call \(\text{gcd}(6, 0)\)
\(\text{gcd}(6, 0)\): \(b = 0\) → return \(a = 6\)
Step 3 – Unwind. Each caller returns v unchanged, so the 6 travels back up through all three levels and \(\text{gcd}(48, 18) = 6\).
Step 4 – Check the result: \(48 = 6 \times 8\) and \(18 = 6 \times 3\), and no larger value divides both.
Step 5 – Eliminate the distractors:
(A) 18 is simply the second argument, returned without recursing. The function returns \(b\) only in the sense that \(b\) becomes the \(a\) of the next call — never on the first pass, since \(b \neq 0\) here.
(B) 12 is the first remainder, \(48 \bmod 18\). Stopping there ignores the recursive call — the algorithm continues until the remainder reaches 0.
(C) 3 does divide both 48 and 18, but it is not the greatest such value. Any common divisor will satisfy a spot check; only the algorithm identifies the largest.
Step 6 – Answer: The correct answer is (D) 6.
Using the FE Reference Handbook for Software Engineering
The Handbook's software material is on pp. 411-413: pointers, hashing and the sorting algorithms on p. 415, data structures including stacks, queues, linked lists and trees on p. 416, and pseudocode conventions with the algorithm-efficiency (Big-O) discussion and binary search on p. 417. Testing levels and development processes are not in the body; they appear in the exam specification and are tested from definitions.
Four Mistakes That Cost Points
- Reporting the average case when the question asks for the worst. Quicksort is n log n on average but n squared in the worst case; a hash lookup is constant on average but linear in the worst case. Big-O questions usually mean the worst case unless they say otherwise.
- Miscounting loop iterations at the boundaries. A loop from one to n inclusive runs n times; a loop from zero to n minus one also runs n times; a loop from one to n exclusive runs n minus one. Off-by-one errors are the most common wrong answer in pseudocode questions.
- Choosing a linked list for index access. A linked list gives constant-time insertion at a known node but linear-time access by position. An array or vector gives constant-time index access. The question tells you which operation dominates.
- Forgetting that a binary search needs sorted data. The logarithmic cost assumes the array is sorted. On unsorted data the search is linear, or you must add the cost of sorting first.
Frequently Asked Questions
How many software engineering questions are on the FE Electrical exam?
NCEES specifies 4-6 questions out of 110.
Which sorting complexities should I know?
Bubble, selection and insertion sort are n squared; merge sort and heap sort are n log n in every case; quicksort is n log n on average and n squared in the worst case. Comparison sorting cannot beat n log n.
What pseudocode conventions does the exam use?
The conventions on p. 417 of the Handbook: indentation for blocks, a left arrow for assignment, and for, while and if constructs. Questions ask for the value of a variable after the code runs.
Is any particular programming language required?
No. Questions are language-neutral pseudocode or general concepts such as pass by value versus reference, scope, recursion and testing levels.
Keep Going
These topics feed into each other on the exam:
- FE Electrical Computer Systems practice problems — 5-8 questions on the exam
- FE Electrical Digital Systems practice problems — 8-12 questions on the exam
- FE Electrical Mathematics practice problems — 11-17 questions on the exam
Done with software engineering? Browse every knowledge area from the free FE Electrical practice problem hub, see what the full bank covers on the FE Electrical exam prep page, or plan your schedule with the FE study timeline. Or test yourself against the clock with the free FE Electrical practice exam: 20 timed questions in the CBT format.