
在數組中的兩個數字,如果前面一個數字大于后面的數字,則這兩個數字組成一個逆序對。輸入一個數組,求出這個數組中的逆序對的總數P。并將P對10000...
題目描述數組中有一個數字出現的次數超過數組長度的一半,請找出這個數字。例如輸入一個長度為9的數組{1,2,3,2,2,2,5,4,2}。由于數字...
Given a set of candidate numbers (C) (without duplicates) and a target n...
題目 Determine whether an integer is a palindrome. Do this without extra s...
自己在做個vue小demo的時候,想模擬從服務器獲取json數據的過程,一開始的想法是使用fetch直接獲取本地的json文件,無論是insta...
題目 Reverse digits of an integer.The input is assumed to be a 32-bit sign...
題目 Given a string s, find the longest palindromic substring in s. You ma...
題目 There are two sorted arrays nums1 and nums2 of size m and n respectiv...
題目 Given a string, find the length of the longest substring without repe...