Given an array of integers and a target value, find the number of distinct pairs that sum to the target. The pairs (x,y) and (x’, y’) where x smaller …
A complete binary tree is a binary tree that each level except possibiliy the last level, is completed filled. Suppose you are giving a binary tree represented as an …
You are given an array of strings words and a string chars. A string is good if it can be formed by characters from chars (each character can only …
Given the root of a binary tree, find the maximum value V for which there exists different nodes A and B where V = |A.val – B.val| and A …
Given a string date representing a Gregorian calendar date formatted as YYYY-MM-DD, return the day number of the year. Example 1: Input: date = “2019-01-09” Output: 9 Explanation: Given …
Given an array nums of n integers and an integer target, are there elements a, b, c, and d in nums such that a + b + c + …