Tech Study

Tech Study

Interactive lessons in computer science and electronics. Choose a subject to explore its explanations and simulations.

Coding Tests 3

Applications 2

  1. #BOJ 2667

    Ice trays and connected components

    From filling zeros to grouping houses: compare BFS and DFS on the same grid.

  2. Programmers 1844

    Game Map Shortest Path

    Watch BFS distances and the queue to see why the first route to the goal is shortest.

Advanced 1

  1. #POJ 3057

    Minimum time to evacuate a room

    Combine BFS distances with DFS bipartite matching when each door admits one person per second.

Computer Architecture 5

  1. Instruction Cycle

    Follow register and memory transfers as a simple CPU fetches, decodes, and executes instructions.

  2. Pipelines and Hazards

    Step through a five-stage pipeline, data and control hazards, and forwarding.

  3. Cache Mapping

    Split addresses into tag, index, and offset; compare direct-mapped, set-associative, and fully associative caches.

  4. Virtual Memory and the TLB

    Translate virtual addresses through the TLB and page table, and observe page faults.

  5. Branch Prediction

    Compare always-taken, one-bit, and two-bit predictors on branch patterns such as loops.

Data Structures 16

Applications 12

Practice sorting, searching, range techniques, trees, and hashing.

  1. Sorting at a Glance

    Race seven sorting algorithms on the same array and compare their work, complexity, and use cases.

  2. Bubble Sort

    Repeatedly compare adjacent values and swap them to move the largest remaining value to the end.

  3. Selection Sort

    Repeatedly select the smallest remaining value and swap it into the next position.

  4. Insertion Sort

    Take values one at a time and insert them into the sorted prefix.

  5. Counting Sort

    Count occurrences to calculate positions without comparing values to each other.

  6. Binary Search

    Halve the candidates in a sorted array; explore exact search, lower and upper bounds, and parametric search.

  7. Two Pointers

    Move two pointers monotonically to turn some quadratic searches into linear scans.

  8. Sliding Window

    Maintain information about a contiguous range by updating only values entering and leaving it.

  9. Prefix sums

    Precompute prefix totals to answer a range-sum query with one subtraction.

  10. Binary Search Tree

    Insert, find, and delete values; see how tree shape changes and why a skewed tree is slow.

  11. Hash Tables

    Map a key directly to a bucket and explore how collisions are handled.

  12. BFS and DFS

    Explore the same graph breadth-first and depth-first to see how queues and stacks change the visiting order.

Advanced 4

Explore divide and conquer, heaps, shortest paths, and combined algorithms.

  1. Quick Sort

    Partition around a pivot, then recursively sort both sides.

  2. Merge Sort

    Recursively split the array, then merge sorted halves in a divide-and-conquer algorithm.

  3. Heap Sort

    Build a max heap, then repeatedly move the largest value to the end.

  4. Dijkstra's Shortest Paths

    Finalize the closest unsettled node and relax distances to its neighbors.

Databases 5

  1. SQL Execution Order

    Follow a SELECT query from FROM to LIMIT and see the table change at each logical processing step.

  2. JOIN

    Follow how INNER, LEFT, RIGHT, and FULL OUTER JOIN combine rows from two tables.

  3. Indexes and B+ Trees

    Compare B+ tree lookups with full table scans by counting the pages read.

  4. Normalization

    Split an unnormalized table into 1NF, 2NF, and 3NF and observe update, insertion, and deletion anomalies.

  5. Transactions and Isolation Levels

    See whether dirty reads, non-repeatable reads, and phantom reads occur under different isolation levels.

Digital Logic 4

  1. Half Adders and Full Adders

    Toggle three input bits to see how a full adder calculates the sum and carry.

  2. 2-bit Ripple-Carry Adder

    Connect two full adders to add 2-bit numbers and follow the carry into the next position.

  3. Ring Oscillator

    Change the number of NOT gates to compare continuous oscillation with a stable state.

  4. DRAM and NAND Flash

    Compare how DRAM and NAND update data and how long the operations take.

Embedded Systems 5

  1. UART Frames

    Turn one character into a start bit, eight data bits, optional parity, and stop bits.

  2. I2C and SPI

    Step through the clock and data waveforms of two synchronous serial buses.

  3. CRC Calculation (Modbus CRC-16)

    Follow the shifts and XORs that calculate the CRC-16 appended to a Modbus RTU frame.

  4. PWM and Duty Cycle

    Explore how on/off digital output controls LED brightness and motor drive through duty cycle.

  5. ADC Sampling and Aliasing

    See how undersampling can make a signal appear to have an entirely different frequency.

Operating Systems 7

  1. CPU Scheduling

    Run the same four processes with FCFS, SJF, and round robin, then compare waiting times.

  2. Race Conditions and Critical Sections

    Make two threads increment the same counter and see how an expected result of two can become one.

  3. Mutexes

    Protect a critical section with a single-owner lock and explore priority inversion.

  4. Semaphores

    Use a resource counter to coordinate threads in a parking lot and a producer–consumer buffer.

  5. Deadlock

    Watch five dining philosophers deadlock while holding one fork each, then break the cycle.

  6. Page Replacement

    Compare FIFO, LRU, and OPT when memory is full and a page must be evicted.

  7. Memory Allocation and Fragmentation

    Compare first-fit, best-fit, and worst-fit allocation and observe free memory fragmenting.