• (medium)LeetCode 221.Maximal Square

    时间:2022-07-01 00:44:18

    Givena2Dbinarymatrixfilledwith0'sand1's,findthelargestsquarecontainingall1'sandreturnitsarea.Forexample,giventhefollowingmatrix:10100101111111110010Re...

  • [LeetCode] 103. Binary Tree Zigzag Level Order Traversal _ Medium tag: BFS

    时间:2022-06-09 09:06:12

    Givenabinarytree,returnthe zigzaglevelorder traversalofitsnodes'values.(ie,fromlefttoright,thenrighttoleftforthenextlevelandalternatebetween).Forexamp...

  • (medium)LeetCode 220.Contains Duplicate III

    时间:2022-05-24 20:37:31

    Givenanarrayofintegers,findoutwhethertherearetwodistinctindices i and j inthearraysuchthatthedifferencebetween nums[i] and nums[j] isatmost t andthedi...

  • [LeetCode] 55. Jump Game_ Medium tag: Dynamic Programming

    时间:2022-05-11 09:59:05

    Givenanarrayofnon-negativeintegers,youareinitiallypositionedatthefirstindexofthearray.Eachelementinthearrayrepresentsyourmaximumjumplengthatthatpositi...

  • LeetCode: 55. Jump Game(Medium)

    时间:2022-05-11 09:58:59

    1.原题链接https://leetcode.com/problems/jump-game/description/2.题目要求给定一个整型数组,数组中没有负数。从第一个元素开始,每个元素的值代表每一次你能从当前位置跳跃的步数。问能否跳到该数组的最后一个元素位置注意:可以跳的步数超出数组长度依旧视为...

  • 16 3Sum Closest(输出距离target最近的三个数的和Medium)

    时间:2022-04-18 01:51:31

    题目意思:给一个数组,给一个target,找三个数的和,这个和要与target距离最近,输出这个和思路:这个题比3sum要稍微简单一点,如果需要优化,也可以去重,不过因为结果唯一,我没有去重。minabs(flag=num[i]+num[j]+num[k]-target),判断条件稍微调整,就是fl...

  • 蜗牛慢慢爬 LeetCode 11. Container With Most Water [Difficulty: Medium]

    时间:2022-04-15 10:14:40

    题目Givennnon-negativeintegersa1,a2,...,an,whereeachrepresentsapointatcoordinate(i,ai).nverticallinesaredrawnsuchthatthetwoendpointsoflineiisat(i,ai)and...

  • 蜗牛慢慢爬 LeetCode 6. ZigZag Conversion [Difficulty: Medium]

    时间:2022-03-13 07:51:01

    题目Thestring"PAYPALISHIRING"iswritteninazigzagpatternonagivennumberofrowslikethis:(youmaywanttodisplaythispatterninafixedfontforbetterlegibility)PAHNAP...

  • Leetcode11-Container With Most Water-Medium

    时间:2022-03-03 20:03:28

    Given n non-negativeintegers a1, a2,..., an ,whereeachrepresentsapointatcoordinate(i, ai). n verticallinesaredrawnsuchthatthetwoendpointsofline i isat...

  • [LeetCode] 120. Triangle _Medium tag: Dynamic Programming

    时间:2022-01-30 02:05:10

    Givenatriangle,findtheminimumpathsumfromtoptobottom.Eachstepyoumaymovetoadjacentnumbersontherowbelow.Forexample,giventhefollowingtriangle[[2],[3,4],[6...

  • dvwa闯关——medium级SQL

    时间:2022-01-29 03:52:02

    medium级的sql不让用户输入,可以通过burpsuite抓包绕过一、判断是否有注入点,注入类型、字段数等1.是否有注入即注入类型   修改为id=1 and1=1后,如下图:       存在注入点为数字型2.判断字段数1orderby2时: 1 orderby3时:      所以字段数为2...

  • 【Leetcode】11. Container With Most Water (medium)

    时间:2021-12-06 10:57:50

    11.ContainerWithMostWater(medium)描述Givennnon-negativeintegersa1,a2,...,an,whereeachrepresentsapointatcoordinate(i,ai).nverticallinesaredrawnsuchthatth...

  • [LeetCode] 127. Word Ladder _Medium tag: BFS

    时间:2021-10-26 11:07:01

    Giventwowords(beginWord and endWord),andadictionary'swordlist,findthelengthofshortesttransformationsequencefrom beginWord to endWord,suchthat:Onlyonel...

  • (initramfs) Unable to find a medium containing a live file system错误的解决

    时间:2021-10-10 02:35:10

    最近两次装载unbuntu,均遇到了这个问题,而且第二次装的时候居然又忘了第一次怎么解决的了,只好百度、google了好一会儿,还是没用==!于是,想起了第一次怎么解决的了,鉴于自己储存空间太少,一不小心没准又忘了,遂写个随笔记录下来。 首先,我是下的ubuntu-12.04.1-desktop-i...

  • [array] leetCode-11. Container With Most Water-Medium

    时间:2021-09-27 11:04:32

    leetCode-11.ContainerWithMostWater-MediumdescritionGivennnon-negativeintegersa1,a2,...,an,whereeachrepresentsapointatcoordinate(i,ai).nverticallinesar...

  • Leetcode-34-Search for a Range-(Medium)

    时间:2021-09-19 23:02:29

    这道题借助二分查找算法来查找目标值的index然后向前和向后分别搜索起始边界注意开始排除异常值优化速度#!/usr/local/bin/python3#-*-coding:utf-8-*-__author__='author'classSolution(object):defsearchRange(...

  • LeetCode Array Medium 11. Container With Most Water

    时间:2021-08-13 22:33:42

    DescriptionGiven n non-negativeintegers a1, a2,..., an ,whereeachrepresentsapointatcoordinate(i, ai). n verticallinesaredrawnsuchthatthetwoendpointsof...

  • [leetcode] 464. Can I Win (Medium)

    时间:2021-08-02 23:33:06

    原题链接两个人依次从1~maxNum中选取数字(不可重复选取同一个),累和。当一方选取数字累和后结果大于等于给定的目标数字,则此人胜利。题目给一个maxNum和targetNum,要求判断先手能否胜利。思路:首先判断两种特殊条件:可选最大值大于等于目标值,直接返回true。其中一个人可选的最大值小于...

  • 216. Combination Sum III(medium, backtrack, 本类问题做的最快的一次)

    时间:2021-07-17 01:11:34

    Findallpossiblecombinationsofknumbersthatadduptoanumbern,giventhatonlynumbersfrom1to9canbeusedandeachcombinationshouldbeauniquesetofnumbers.Example1:I...