Category: algorithms
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 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 + …
Given a string s and a string t, check if s is subsequence of t. You may assume that there is only lower case English letters in both s …