Coding Exercise Posts - page 15 of 43

Recent posts

Longest Tree Sum Path From Root to Leaf

less than 1 minute read

Given a binary tree root, return the sum of the longest path from the root to a leaf node. If there are two equally long paths, return the larger sum.

Longest Anagram Subsequence

less than 1 minute read

Given two lowercase alphabet strings a and b, return the length of the longest anagram subsequence.

Lone Integer

less than 1 minute read

You are given a list of integers nums where each integer occurs exactly three times except for one which occurs once. Return the lone integer.

Largest Sublist Sum

less than 1 minute read

Given a list of integers nums, return the sum of a non-empty contiguous sublist with the largest sum.

Largest Island Area

1 minute read

You are given a two-dimensional integer matrix of 1s and 0s. A 1 represents land and 0 represents water, so an island is a group of 1s that are neighboring w...

Largest Anagram Group

less than 1 minute read

Given a list of strings words, group all anagrams together and return the size of the largest grouping.

K Unique String

1 minute read

Given a string s of lowercase alphabet characters, and an integer k, return the minimum number of changes needed in the string (one change involves changing ...

Interleaved Linked List

less than 1 minute read

Given two linked lists l0 and l1, return the two linked lists interleaved, starting with l0. If there are leftover nodes in a linked list, they should be add...

Balanced Brackets Sequel

less than 1 minute read

Given a string s containing round, curly, and square open and closing brackets, return whether the brackets are balanced.

Peekable Iterator

1 minute read

Implement an iterator of a list of integers nums where