ECE532 · Electrical & Electronic Engineering
Data Structures and Algorithms for engineers. Lists, stacks, queues, trees and graphs taught through signals, sensors and fault logs — with interactive visualisers, Python challenges and weekly quizzes that mark themselves.
What you'll do
Every structure is introduced through a problem you would meet in a lab or on a board, then implemented in Python and tested.
Step through a linked list, a stack machine or a binary search tree one operation at a time, like watching a signal on a scope.
Decode resistor colour bands, smooth sensor readings, parse fault logs and queue jobs. Each challenge ships with starter code.
Weekly quizzes are graded the moment you submit. Code goes to your lecturer with a line-by-line output comparison.
See exactly how much of each week is done, what is due next, and your marks for Test 1 and Test 2.
Signal path
Each week is released to your class by your lecturer, so the list below shows the full route. Your dashboard shows where you are on it.
≈ 56 h of guided work
What an algorithm is, how to design one with pseudocode and flowcharts, the Python you need to express it, and a first look at how we measure efficiency.
Repetition with while and for, lists and tuples (and why copying is not aliasing), and functions: arguments, return values, scope and how Python passes a reference.
Recursive definitions and the call stack that runs them; kinds and cost of recursion; classes, objects, self, private state, __str__ and UML; and the Node class that Week 4 links together.
Why arrays fall short, the node and the chain, inserting and removing with the pointer updates in the right order, the cost of every operation versus a Python list, and doubly linked lists, iterators and generators.
LIFO and FIFO: stacks and queues on a Python list and on a linked chain, the circular-array queue with front, rear and count, overflow policies, priority queues and the deque — and how to choose between them.
Infix, prefix and postfix; evaluating postfix (left to right) and prefix (right to left) with a stack; the shunting-yard conversions with precedence and associativity; back to infix with minimal parentheses.
Tree terminology and representations; binary trees and the BST property; iterative insertion and search; inorder, preorder, postorder and level-order traversals; expression trees built from postfix.
Search cost is the height; the two-case deletion with rightMost; complete trees, the heap property, reheapification up and down in an array; priority queues with a heap and Python's heapq.
G = (V, E) and the terminology; adjacency matrix versus adjacency list; depth-first search by recursion and with a stack; breadth-first search with a queue; reachability, components, fewest-hop paths and netlist checks.
Spanning trees and the greedy idea; Kruskal with Union-Find; Prim with a heap; Dijkstra with the iteration table, predecessors and the non-negative-weight limitation; which algorithm for which engineering question.
Big-O made formal (the definition, the counting rules, best/worst/average, the doubling test); selection, insertion and bubble sort by hand and in Python with comparison and move counters; stability, adaptivity and where the quadratic sorts still belong in engineering code.
Divide and conquer; the merge step and merge sort (top-down and bottom-up) with its n log n derivation; the deck's Lomuto partition, quicksort, pivot strategies and the sorted-input worst case; all five sorts compared, the Ω(n log n) lower bound, what real libraries do, and the mini-project briefing.
Linear search and its (n+1)/2 average; binary search by hand with the low / high / mid table, the deck's −insertion point − 1 convention and the missing low = 0; hashing as retrieval without searching, h(key) = key % m, string hashing and why the table size should be prime; separate chaining and linear probing, the load factor, primary clustering and the tombstone.
Open addressing in general — the i-th probe at (h(key) + f(i)) % m; quadratic probing by hand and the insert that can never succeed; the prime-size, α < ½ guarantee; double hashing, why g(key) must never be 0 and must be coprime with m; the load factor as the control variable, rehashing into the next prime and why it is O(1) amortised; Map and Set; and the whole course in one table.
How it works
No registration form. Your Universiti Teknologi MARA Google account is your student ID.
Sign in with GoogleUse your university Google account. If your lecturer has added you, you land straight in your class.
Read the pages, run the visualiser, then take the trace-the-output set and the Python challenge.
Quiz marks appear instantly. Code and assignments come back with comments from your lecturer.