随笔分类 -  LeetCode Problem

摘要:题目 You are given an integer array height of length n. There are n vertical lines drawn such that the two endpoints of the ith line are (i, 0) and (i, 阅读全文
posted @ 2021-12-30 01:45 红鲤鱼绿鲤鱼与阿米娅 阅读(23) 评论(0) 推荐(0)
摘要:题目 Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You may assume that each 阅读全文
posted @ 2021-12-30 01:40 红鲤鱼绿鲤鱼与阿米娅 阅读(27) 评论(0) 推荐(0)
摘要:题目 You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order, and each of their nodes co 阅读全文
posted @ 2021-12-30 01:37 红鲤鱼绿鲤鱼与阿米娅 阅读(26) 评论(0) 推荐(0)
摘要:题目 Given a string s, find the length of the longest substring without repeating characters. Example 1: Input: s = "abcabcbb" Output: 3 Explanation: Th 阅读全文
posted @ 2021-12-30 01:29 红鲤鱼绿鲤鱼与阿米娅 阅读(36) 评论(0) 推荐(0)
摘要:题目 Given a string s, return the longest palindromic substring in s. Example 1: Input: s = "babad" Output: "bab" Explanation: "aba" is also a valid ans 阅读全文
posted @ 2021-12-30 01:12 红鲤鱼绿鲤鱼与阿米娅 阅读(32) 评论(0) 推荐(0)
摘要:题目 Given two sorted arrays nums1 and nums2 of size m and n respectively, return the median of the two sorted arrays. The overall run time complexity s 阅读全文
posted @ 2021-12-30 01:07 红鲤鱼绿鲤鱼与阿米娅 阅读(26) 评论(0) 推荐(0)
摘要:题目 Implement the myAtoi(string s) function, which converts a string to a 32-bit signed integer (similar to C/C++'s atoi function). The algorithm for m 阅读全文
posted @ 2021-12-30 01:02 红鲤鱼绿鲤鱼与阿米娅 阅读(26) 评论(0) 推荐(0)
摘要:题目 &npsb; Given a signed 32-bit integer x, return x with its digits reversed. If reversing x causes the value to go outside the signed 32-bit integer 阅读全文
posted @ 2021-12-30 00:54 红鲤鱼绿鲤鱼与阿米娅 阅读(25) 评论(0) 推荐(0)
摘要:题目 ​Given an integer x, return true if x is palindrome integer. An integer is a palindrome when it reads the same backward as forward. For example, 12 阅读全文
posted @ 2021-12-30 00:49 红鲤鱼绿鲤鱼与阿米娅 阅读(29) 评论(0) 推荐(0)
摘要:题目 Implement pow(x, n), which calculates x raised to the power n (i.e., xn). Example 1: Input: x = 2.00000, n = 10 Output: 1024.00000 Example 2: Input 阅读全文
posted @ 2021-12-16 12:06 红鲤鱼绿鲤鱼与阿米娅 阅读(27) 评论(0) 推荐(0)
摘要:题目 Given an array of strings strs, group the anagrams together. You can return the answer in any order. An Anagram is a word or phrase formed by rearr 阅读全文
posted @ 2021-12-16 11:33 红鲤鱼绿鲤鱼与阿米娅 阅读(44) 评论(0) 推荐(0)
摘要:题目 Determine if a 9 x 9 Sudoku board is valid. Only the filled cells need to be validated according to the following rules: 1.Each row must contain th 阅读全文
posted @ 2021-12-15 13:23 红鲤鱼绿鲤鱼与阿米娅 阅读(37) 评论(0) 推荐(0)