摘要:
今天处理一下一系列题目:Next Greater Element系列。 Next Greater Element I You are given two arrays (without duplicates) nums1 and nums2 where nums1’s elements are su 阅读全文
摘要:
Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST. According to the definition of LCA on Wikipedia 阅读全文
摘要:
Given an integer array with even length, where different numbers in this array represent different kinds of candies. Each number means one candy of th 阅读全文
摘要:
Give a string s, count the number of non-empty (contiguous) substrings that have the same number of 0's and 1's, and all the 0's and all the 1's in th 阅读全文
摘要:
Given a sorted (in ascending order) integer array nums of n elements and a target value, write a function to search target in nums. If target exists, 阅读全文