Category: c / c++
Given a singly linked list node, return the value of the kth last node (0-indexed). k is guaranteed not to be larger than the size of the linked list. …
Given a list of integers nums, return whether all numbers appear an even number of times. Constraints n ≤ 100,000 where n is the length of nums Example 1 …
Given a string s , find the length of the longest substring t that contains at most 2 distinct characters. Example 1: Input: “eceba” Output: 3 Explanation: t is …
Given a list of integers nums, return whether it represents a max heap. That is, for every i we have that: nums ≥ nums if 2*i + 1 is …
Given a binary tree root, count and return the number of nodes where its value is greater than or equal to the values of all of its descendants. For …