Tag: C++ Algorithm
Given a list of integers nums, return whether you can partition the list into two non-empty sublists such that every number in the left sublist is strictly less than …
Given two strings a, and b, both representing an integer, add them and return it in the same string representation. Bonus: can you implement the addition directly, instead of …
Given a string s, return whether it’s a repeating string. Constraints n ≤ 100,000 where n is the length of s Example 1 Input s = “dogdogdog” Output true …
Given a root of an N-ary tree, you need to compute the length of the diameter of the tree. The diameter of an N-ary tree is the length of …
Given an integer n. Each number from 1 to n is grouped according to the sum of its digits. Return how many groups have the largest size. Example 1: …