摘要: 今天处理一下一系列题目:Next Greater Element系列。 Next Greater Element I You are given two arrays (without duplicates) nums1 and nums2 where nums1’s elements are su 阅读全文
posted @ 2018-07-13 23:16 Lin.B 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2018-07-13 19:53 Lin.B 阅读(89) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2018-07-13 12:07 Lin.B 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2018-07-13 11:44 Lin.B 阅读(94) 评论(0) 推荐(0) 编辑
摘要: 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, 阅读全文
posted @ 2018-07-13 10:41 Lin.B 阅读(101) 评论(0) 推荐(0) 编辑