文章
121. Best Time to Buy and Sell Stock
121.BestTimetoBuyandSellStock<blockquoteSayyouhaveanarrayforwhichtheithelementisthepriceofagivenstockondayi.<pIfyo
算法:给定一个整数数组和一个目标值,找出数组中和为目标值的两个数
给定一个整数数组和一个目标值,找出数组中和为目标值的两个数。你可以假设每个输入只对应一种答案,且同样的元素不能被重复利用。示例:<pre<code给定nums2,7,11,15,target9因为nums0nums1
[LintCode/LeetCode] Integer Replacement
ProblemGivenapositiveintegernandyoucandooperationsasfollow:1.Ifniseven,replacenwithn/2.2.Ifnisodd,youcanreplacenwit
leetcide 50 Pow(x, n)
问题描述<blockquoteImplementpow(x,n),whichcalculatesxraisedtothepowern(xn).<br/题目要求我们实现一个求x的n次幂的函数(pow函数),其中幂次数也可以是复数。<br/其中n是Integer
leetcode 49 Group Anagrams
题目详情<blockquoteGivenanarrayofstrings,groupanagramstogether.<br/题目要求输入一个字符串数组,我们要将由同样字母组成的字符串整理到一起,然后以如下例子中的格式输出。<br/不需要关注输出的顺序,所有的输入都
292. Nim Game
题目链接:NimGame(https://link.segmentfault.com/?enclTup%2B7YAEPUgvOXixbKoBw%3D%3D.PMcFPq5iELYBzKrFiO6hB%2F2OUQHbeLjDRZGyiyDwGzAKatMfDaKUaGTETKrGi7
268. Missing Number
题目链接:MissingNumber(https://link.segmentfault.com/?enc5xOx4QcUEK3LuQX1tQcXQw%3D%3D.fgZXtwbwS%2Fqt7lUpSJEEMh7mN1xyMsI%2FhtrSor4Ty9YKvzqpiSrCazOL
774. Jewels and Stones
题目链接:JewelsandStones(https://link.segmentfault.com/?encvOt8AsKkaZRhbgwsHsVxJg%3D%3D.z11Nt5ciB20%2B9uyM%2F%2B9wLOHE3be1F5ZESH%2BTfYhK99tnSnhQ4
leetcode349. Intersection of Two Arrays
题目要求<pre<codeGiventwoarrays,writeafunctiontocomputetheirintersection.Example:Givennums11,2,2,1,nums22,2,return
7. Reverse Integer
题目链接:ReverseInteger(https://link.segmentfault.com/?encERWIFojTXJd4MRx6tzm72A%3D%3D.p532b2isrnvfGOSiGkCsYmLIpMDMmFbj0uoiHsvifHE8eu6TY0H37O4EwOY
已加载文章中没有匹配内容,试试其他关键词或清空搜索。