Tag: c++
Given an alphanumeric string s, return the second largest numerical digit that appears in s, or -1 if it does not exist. An alphanumeric string is a string consisting …
Given a list of integers nums, consider every contiguous sublist. Sum each of these sublists and return the sum of all these values. Mod the result by 10 ** …
Given a list of integers nums, return the number of contiguous arithmetic sequences of length ≥ 3. Constraints n ≤ 10,000 where n is length of nums. Example 1 …
Given a binary tree root, return the number of nodes that are an only child. A node x is an only child if its parent has exactly one child …
Given a singly linked list node, return the value of the middle node. If there’s two middle nodes, then return the second one. Constraints n ≤ 100,000 where n …