主要考察的是代码的完整性:是否将所有情况考虑清楚,以及错误的输入情况。考察思考问题是否全面。 题目描述: 给定一个double类型的浮点数base和int类型的整数exponent。求base的exponent次方。 输…
分类:LeetCode题目解答汇总
LeetCode | Median of Two Sorted Arrays(两个数组的中位数)
题目: There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays…
Lettcode | Two Sum(两个数的和等于定值)
题目: Given an array of integers, find two numbers such that they add up to a specific target number. The functi…
LeetCode | Longest Substring Without Repeating Characters(最长连续不重复子串)
题目: Given a string, find the length of the longest substring without repeating characters. For example, the lo…
LeetCode | Add Two Numbers(两个链表相加)
题目: You are given two linked lists representing two non-negative numbers. The digits are stored in reverse ord…
LeetCode | Longest Palindromic Substring(最长回文子串)
题目: Given a string S, find the longest palindromic substring in S. You may assume that the maximum l…
LeetCode | Reverse Integer(翻转整数)
题目: Reverse digits of an integer. Example1: x = 123, return 321Example2: x = -123, return -321 click…
LeetCode | ZigZag Conversion(锯齿形转换)
The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you…
LeetCode | Palindrome Number(回文数字)
题目: Determine whether an integer is a palindrome. Do this without extra space. click to show spoilers. Some hi…
LeetCode | Integer to Roman(整数转换成罗马数字)
Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 to 3999. 关于…
LeetCode | Container with most water(装最多的水)
Given n non-negative integers a1, a2, …, an, where each represents a point at c…
LeetCode | Roman to Integer(罗马数字转换成整数)
Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999. 题目…