leetcode

Leetcode PHP题解--D120 830. Positions of Large Groups
830. Positions of Large Groups
2020-09-18 08:28:47阅读全文

Leetcode PHP题解--D125 107. Binary Tree Level Order Traversal II
107. Binary Tree Level Order Traversal II
2020-10-02 12:08:04阅读全文

Leetcode PHP题解--D126 717. 1-bit and 2-bit Characters
717. 1-bit and 2-bit Characters
2020-10-10 10:24:22阅读全文

LeetCode 题解与知识点 2. 两数相加 Add-Two-Numbers
2. Add-Two-Numbers 难度:$\color{#00965e}{medium}$
2020-10-26 09:34:15阅读全文

LeetCode PHP题解 3. 无重复字符的最长子串
3. longest-substring-without-repeating-characters 难度:medium
2020-10-31 14:00:20阅读全文

Leetcode PHP题解--D131 746. Min Cost Climbing Stairs
746. Min Cost Climbing Stairs
2020-10-31 09:53:28阅读全文

将两个有序数组合并为一个有序数组
题目:给定两个有序数组,将其合并为一个有序数组。思路:采用双指针的方式,依次遍历两个数组 a,b。然后对比两个数组各个位置的元素,a小于b,则将a的元素存入新数组,然后a的指针加1,a==b,则将两个元素都放入新数组,下标都加1,如果a大于b,则将b的元素放入新数组,然后b的指针加1。
2021-12-14 09:31:40阅读全文