Tag: C++ Algorithm
Given a binary tree with the following rules: root.val == 0 If treeNode.val == x and treeNode.left != null, then treeNode.left.val == 2 * x + 1 If treeNode.val …
Given two numbers, hour and minutes. Return the smaller angle (in sexagesimal units) formed between the hour and the minute hand. Example 1: Input: hour = 12, minutes = …
Given a sorted list of disjoint intervals, each interval intervals = represents the set of real numbers x such that a <= x < b. We remove the intersections …
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 …
Given an encoded string, return it’s decoded string. The encoding rule is: k, where the encoded_string inside the square brackets is being repeated exactly k times. Note that k …