Algorithms

Reversing Linked List Nodes in Groups of K

Reverse the nodes of a linked list, k at a time, and return the modified list.

Read
Algorithms

Longest Non-Contiguous, Non-Decreasing Subsequence

Find the longest non-contiguous, non-decreasing subsequence in an array of numbers.

Read
Algorithms

Maximum Points on a Line

Given n points on a 2D plane, find the maximum number of points that lie on the same straight line.

Read
Algorithms

Minimum Palindromic Partitions

Given a string, split it into as few strings as possible such that each string is a palindrome.

Read
Algorithms

Merging Binary Search Trees

Merge two binary search trees into a single binary search tree.

Read
Algorithms

Binary Tree Path Sums

You are given a binary tree in which each node contains an integer value. Find the number of paths that sum to a given value. The path does not need to start or end at the root or a leaf.

Read
Algorithms

Alien Dictionary

I embark on a month-long journey to blog about one interesting algorithmic problem a day. I start by diving into the commonly-feared Alien Dictionary problem.

Read
Algorithms

The Josephus Problem

A circle of individuals are about to executed. With the help of some recursive Python, you can predict who will be the last person standing.

Read