Wrapping and Truncating Overflowing Text with CSS

A consistent approach to using white-space, overflow-wrap, word-break, and various text formatting properties in CSS.

Read
Web Development

3 Security Must-Knows for Front-End Developers

A brief review of HTTPS, XSS (Cross-Site Scripting), and CSRF (Cross-Site Request Forgery).

Read
Algorithms

28 Coding Challenges in 28 Days

28 classic problems to test your knowledge of algorithms and data structures –– with detailed walkthroughs for each of them.

Read
Algorithms

Sliding Puzzle

A 2x3 puzzle board has tiles numbered 1 to 5 and an empty square represented by 0. A move consists of swapping 0 with an adjacent number. The puzzle is solved when [[1, 2, 3], [4, 5, 0]] is achieved. Given a puzzle configuration, return the least number of moves required to solve it.

Read
Algorithms

Convex Hull

There are multiple trees growing in a garden, each with a distinct (x, y) coordinate. You are tasked to enclose all of these trees with a single rope. The amount of rope you use should be minimised. Find the coordinates of the trees located along the rope.

Read
Algorithms

Huffman Coding

Given a set of characters and their corresponding frequencies of occurrence, produce Huffman codes for each character such that the average code length is minimised. Return the average code length.

Read
Algorithms

Thinking About Partitions

Given an array with n objects colored red, white, or blue, sort them in-place in a single pass. Objects of the same color should be adjacent to each other and the sorted colors should be in the order of red, white, and blue.

Read
Algorithms

Querying Range Sums (2D)

Design a matrix-like data structure that allows you to update elements and query submatrix sums efficiently.

Read