随笔分类 - LeetCode
摘要:问题描述 Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find...
阅读全文
摘要:题目 Given a string, find the length of the longest substring without repeating characters. Examples: Given "abcabcbb", the answer is "abc", which the l
阅读全文
摘要:题目 You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a sing
阅读全文
摘要:题目 Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have
阅读全文
摘要:题目 Implement a basic calculator to evaluate a simple expression string. The expression string contains only non-negative integers, +, -, *, / operator
阅读全文
摘要:题目 Given an integer matrix, find the length of the longest increasing path. From each cell, you can either move to four directions: left, right, up or
阅读全文
摘要:问题: Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive. Example:Given nums = [-2, 0, 3, -5, 2, -1] sumRange(0, 2) -> 1 sumRange(2, 5) -> -1 sumRang...
阅读全文

浙公网安备 33010602011771号