Coding Exercise Posts - page 16 of 43

Recent posts

Palindromic Anagram

less than 1 minute read

Given a string s, determine whether any anagram of s is a palindrome.

Pairwise Linked List Swap

less than 1 minute read

Given a singly linked list node, swap each pair of nodes and return the new head.

Packing Boxes

1 minute read

Given a list of integers nums, pack consecutive elements of the same value into sublists.

No New Friends

1 minute read

You are given n people represented as an integer from 0 to n - 1, and a list of friends tuples, where person friends[i][0] and person friends[i][1] are frien...

N Lexicographic Integers

less than 1 minute read

Given an integer n, return first n integers sorted in lexicographic order.

Merging K Sorted Lists

less than 1 minute read

Given a list of sorted lists of integers, merge them into one large sorted list.

Largest Root to Leaf Sum

less than 1 minute read

Given the root to a binary tree root, return the largest sum of any path that goes from the root to a leaf.

Count Substrings With All 1s

less than 1 minute read

You are given a string s containing "1"s and "0"s. Return the number of substrings that contain only "1"s. Mod the result by 10 ** 9 + 7.

Binary Matrix Leftmost One

1 minute read

You are given a two-dimensional list of integers matrix which contains 1s and 0s. Given that each row is sorted in ascending order with 0s coming before 1s, ...

Anagram Checks

less than 1 minute read

Given two strings s0 and s1, return whether they are anagrams of each other.