接外包,有相关需求的可以联系我:Telegram | Email

Binary Search

Description Given an array of integers nums which is sorted in ascending order, and an integer target, write a function to search target in nums. If target exists, then return its index. Otherwise, return -1. You must write an algorithm with O(log n) runtime complexity. https://leetcode.com/problems/binary-search/ Code submit code class Solution: def search(self, nums: L......

Longest Substring Without Repeating Characters | Sliding Windows

Descreption Given a string s, find the length of the longest substring without repeating characters. https://leetcode.com/problems/longest-substring-without-repeating-characters/ Solution sliding windows, The most import things is how to get The max. Code submit code class Solution: def lengthOfLongestSubstring(self, ......

Find All Anagrams in a String | Sliding Windows

Desciption Given two strings s and p, return an array of all the start indices of p\'s anagrams in s. You may return the answer in any order. An Anagram is a word or phrase formed by rearranging the letters of a different word or phrase, typically using all the original letters exactly once. Input: s = "cbaebabacd", p = "abc" Output: [0,6] Explanation: The ......

Minimum Window Substring

Description Given two strings s and t of lengths m and n respectively, return the minimum window substring of s such that every character in t (including duplicates) is included in the window. If there is no such substring, return the empty string "". The testcases will be generated such that the answer is unique. A substring is a contiguous sequence of characters with......

Permutation in String

Desciption Given two strings s1 and s2, return true if s2 contains a permutation of s1, or false otherwise. In other words, return true if one of s1's permutations is the substring of s2. Input: s1 = "ab", s2 = "eidbaooo" Output: true Explanation: s2 contains one permutation of s1 ("ba"). https://leetcode.com/problems/permutation-in-string/ Thought Slide Win......

Reverse String

Desciption Write a function that reverses a string. The input string is given as an array of characters s. You must do this by modifying the input array in-place with O(1) extra memory. Thought Two Pointer Code class Solution: def reverseString(self, s: List[str]) -> None: """ Do not return anything, modify s in-place instead. """ # s.......

两数之和 II - 输入有序数组

描述 给你一个下标从 1 开始的整数数组 numbers ,该数组已按 非递减顺序排列 ,请你从数组中找出满足相加之和等于目标数 target 的两个数。如果设这两个数分别是 numbers[index1] 和 numbers[index2] ,则 1 <= index1 < index2 <= numbers.length 。 以长度为 2 的整数数组 [index1, index2] 的形式返回这两个整数的下标 index1 和 index2。 你可以假设每个输入 只对应唯一的答案 ......

删除链表的倒数第 N 个结点 | 双指针

描述 给你一个链表,删除链表的倒数第 n 个结点,并且返回链表的头结点。 https://leetcode-cn.com/problems/remove-nth-node-from-end-of-list/ 思路 双指针技巧,快慢指针。 Code 提交Code # Definition for singly-linked list. # class ListNode: # def __init__(self, val=0, next=None): # self.val = val # self.next = next class Solution: def......

环形链表 II - 双指针

Description 给定一个链表的头节点 head ,返回链表开始入环的第一个节点。 如果链表无环,则返回 null。 如果链表中有某个节点,可以通过连续跟踪 next 指针再次到达,则链表中存在环。 为了表示给定链表中的环,评测系统内部使用整数 pos 来表示链表尾连接到链表中的位置(索引从 0 开始)。如果 pos 是 -1,则在该链表中没有环。注意:pos 不作为参数进行传递,仅仅是为了标识链表的实际情况。 https:......

Amazift GTS2 mini

自己一直用的小米手环4没NFC和血氧,想想用了也快两年了就想换个设备玩玩,最后在综合比较下对比了4款,最终选择了Amazift GTS2 mini,小米本身也是由华米代工的,健康数据迁移一个Zepp就能搞定。没选红米是想换个品牌外加不太喜欢那种纯塑料和表带的设计。 聊聊 看评论时,发现有人反馈是1年前的货。当时反馈说我这个地方是最新的,但收到货却还是1年前的。也不想来回折腾了,感觉可能还是没太新的货......


YouTube | B站

微信公众号

优惠码

阿里云国际版20美元
Vultr10美元
搬瓦工 | Bandwagon应该有折扣吧?
Just My SocksJMS9272283 【注意手动复制去跳转】
域名 | namesiloemperinter(1美元)
币安 币安