leetcode 88--Merge Sorted Array 数组 合并 双指针
Giventwosortedintegerarraysnums1andnums2,mergenums2intonums1asonesortedarray.Note:Youmayassumethatnums1hasenoughspace(sizethatisgreaterorequaltom+n)to...
<挑战程序设计竞赛> poj 3320 Jessica's Reading Problem 双指针
地址 http://poj.org/problem?id=3320解答使用双指针在指针范围内是否达到要求若不足要求则从右进行拓展 若满足要求则从左缩减区域代码如下 正确性调整了几次然后被输入卡TLE卡了很久都没意识到.........#include<iostream>#include&...
如何使用双指针释放树结构?
IhavetofreeatreeandsethisroottoNULLusingaparticularfunction.Itriedtousearecoursivemethod.ButifIcompileigetsomewarningsabout"incompatiblepointertype"an...
双指针+滑动窗体
一:MinimumSizeSubarraySum(最小长度子数组的和O(N))题目:Givenanarrayof n positiveintegersandapositiveinteger s,findtheminimallengthofasubarrayofwhichthesum≥ s.Ifthe...
深入理解双指针的两种用法
本篇文章是对双指针的两种用法进行了详细的分析介绍,需要的朋友参考下
(字符串 数组 递归 双指针) leetcode 344. Reverse String
Writeafunctionthatreversesastring.Theinputstringisgivenasanarrayofcharacters char[].Donotallocateextraspaceforanotherarray,youmustdothisby modifyingth...