Coding Exercise Posts - page 32 of 43

Recent posts

Longest Common Substring

less than 1 minute read

Given two lowercase alphabet strings s0, and s1, return the length of their longest common substring.

Longest Common Subsequence

less than 1 minute read

Given two strings a and b, return the length of their longest common subsequence.

Longest Common Prefix

less than 1 minute read

Given a list of lowercase alphabet strings words, return the longest common prefix.

Longest Alliteration

less than 1 minute read

Given a list of lowercase alphabet strings words, return the length of the longest contiguous sublist where all words share the same first letter.

List to Binary Search Tree

less than 1 minute read

Given a sorted list nums of size n, construct a binary search tree by

List Partitioning

less than 1 minute read

Given a list of strings strs, containing the strings "red", "green" and "blue", partition the list so that the red come before green, which come before blue.

List Min Replacement

less than 1 minute read

Given a list of integers nums, replace every nums[i] with the smallest integer left of i. Replace nums[0] with 0.

List Equality with Increments

less than 1 minute read

You are given a list of integers nums, and want to make the values equal. Consider an operation where you pick an integer in the list and increment every oth...

Linked List Union

less than 1 minute read

Given two sorted linked lists node0, and node, return a new sorted linked list containing the union of the two lists.

Linked List to Integer

less than 1 minute read

Given a single linked list node, representing a binary number with most significant digits first, return it as an integer.

Linked List Jumps

less than 1 minute read

You are given a singly linked list node containing positive integers. Return the same linked list where every node’s next points to the node val nodes ahead....