← Back to Projects

Coding Katas

12 algorithm challenges — ported from Node.js + Jest to an interactive in-browser playground. Inputs are editable; click any preset to load an example.

#1

Basketball Points

Given 2-pointers and 3-pointers scored, return the total score.

#2

Hitting the Jackpot

Returns true if all 4 slot-machine elements are identical.

#3

Game of Thrones Titles

Capitalise words except "and", "the", "of", "in". Commas followed by a space. Ends with period.

#4

Second Largest

Returns the second largest number from an array (handles duplicates).

#5

Rearrange the Sentence

Each word has an embedded digit indicating its position. Return them in order.

#6

Count Instances

Count how many times a single character appears in a string.

#7

Give Me a Hint

Returns an array of strings that progressively reveal each word one letter at a time.

#8

IPv4 Validation

Returns true if a string is a valid IPv4 address (4 octets, 0–255, no leading zeros, last octet not 0).

#9

Anagram Finder

Find all words in the list that are anagrams of the input word.

#10

Unlucky Years

Returns the number of Friday the 13ths in a given year.

#11

X and Os

Click cells to cycle X → O → empty. Find the winning move for X (2 X's already in a winning line, no blocking O).

Click to cycle: empty → X → O → empty

#12

Capital Front, Numbers Back

Reorder a string: uppercase letters first, lowercase in the middle, digits at the end.