摘要:
题目描述 Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may c 阅读全文
摘要:
题目描述 Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your 阅读全文
摘要:
题目描述 Implement a basic calculator to evaluate a simple expression string. The expression string contains only non-negative integers, +, -, *, / operat 阅读全文
摘要:
题目描述 Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree. According to the definition of LCA on Wikipedia: “The 阅读全文
摘要:
题目描述 Given an array nums, there is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the 阅读全文
摘要:
题目描述 Given two strings s and t , write a function to determine if t is an anagram of s. Example 1: Input: s = "anagram", t = "nagaram"Output: true Exa 阅读全文
摘要:
题目描述 Median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value. So the median is the mean of th 阅读全文