Software Engineering

Rotate a Matrix

How to rotate a matrix by 90 degrees using simple operations: reverse rows then transpose along the diagonal. The solution involves two clear steps that transform the matrix in place efficiently.

February 5, 2026

Shipping Packages in D Days: Finding Minimum Capacity

How to find the minimum conveyor capacity needed to ship packages within D days using binary search. The problem involves sequential shipping with weight constraints and demonstrates efficient algorithmic optimization.

February 5, 2026

Sort Characters by Frequency

A bucket sort approach to rearrange characters by their frequency in O(n) time. The solution uses hash maps for counting and buckets for sorting by frequency.

February 5, 2026

Squares of a Sorted Array

Given an array sorted in ascending order, return the squares of each element in ascending order. The solution uses binary search to find the zero point and merges the squared values from both sides.

February 5, 2026

String Permutation Detection: Two Sliding Window Approaches

Two efficient approaches to detect if one string contains a permutation of another. The first uses fixed-length array sliding with O(n) time complexity, and the second optimizes with two pointers maintaining a sliding window at 8ms performance.

February 5, 2026

String to Integer Conversion

Convert string to integer with overflow detection. The key challenge lies in detecting integer overflow during conversion by comparing values against INT_MAX and INT_MIN before they exceed limits.

February 5, 2026

Sudoku Solver

A depth-first search solution that fills numbers 1-9 into empty cells while using preprocessed constraints to prune the search space and reduce complexity.

February 5, 2026

Sum of Even Numbers After Queries

A solution to the LeetCode problem that calculates even number sums after each query operation. The approach maintains running totals efficiently to achieve O(N) time complexity with careful handling of negative modulo operations.

February 5, 2026

Valid Sudoku: Using Indices as Hash Tables

Check if a partially filled Sudoku board is valid using a simple traversal technique. The solution treats array indices as hash tables to track row, column, and box constraints in O(N²) time.

February 5, 2026

Video Stitching: Finding Minimum Clips to Cover Time Range

Given start and end times of video clips, find the minimum number of clips needed to cover the entire 0 to T time range. Two approaches: dynamic programming with cubic time complexity and greedy algorithm with N log N performance.

February 5, 2026