海量技术面试题库,拥有算法、数据结构、系统设计等 1000+题目,帮助你高效提升编程技能,轻松拿下世界 IT 名企 Dream Offer。
Question 4: Longest Continuous Increasing Subsequence(Leetcode-674) 题目描述 给定一个未经排序的整数数组,找到最长且连续的的递增序列。 示例1: 输入: [1,3,5,4,7] 输出: 3 解释: 最长连续递增序列是 [1,3,5], 长度为3。 尽管 [1,3,5,7] 也是升序的子序列, 但它不是连续的,因为5和7在原数组...
1342. 将数字变成 0 的操作次数 - 给你一个非负整数 num ,请你返回将它变成 0 所需要的步数。 如果当前数字是偶数,你需要把它除以 2 ;否则,减去 1 。 示例 1: 输入:num = 14 输出:6 解释:步骤 1) 14 是偶数,除以 2 得到 7 。步骤 2) 7 是奇数,减 1 得到 6
Given a stringSand a stringT, count the number of distinct subsequences ofTinS. A subsequence of a string is a new string which is formed from the original string by deleting some (can be none) of the characters without disturbing the relative positions of the remaining characters. (ie,"ACE...
Question 6 Plus One Given a non-negative number represented as an array of digits, plus one to the number. The digits are stored such that the most significant digit is at the head of the list. A trick here is if the carry remains 1 till the end, only the most significant bit is ...
Question 560. 和为K的子数组 难度:简单 ❝ 给定一个整数数组和一个整数 k,你需要找到该数组中和为 k 的连续的子数组的个数。 示例1 : 代码语言:javascript 代码运行次数:0 运行 AI代码解释 输入:nums=[ 1,1,1],k=2输出: 2,[1,1]与[1,1]为两种不同的情况。
转载自:LeetCode Question Difficulty Distribution 1 Two Sum 2 5 array sort set Two Pointers 2 Add Two Numbers 3 4 linked list Two Pointers Math 3 Longest Substring Without Repeating Characters 3 2 string Two Pointers hashtable 4 Median of Two Sorted Arrays 5 3 array Binary Search 5 Longest ...
当前节点无法知晓前一个节点的信息;如果增删改当前节点,上一个节点的next就得不到更新Question给你一...
IdQuestionDifficultyFrequencyData StructuresAlgorithms1Two Sum25array + setsort + two pointers2Add Two Numbers34linked listtwo pointers + math3Longest
...for those who wanted to navigate through LeetCode, but only know the question number What's this? This is a simple LeetCode navigator that goes to a selected LeetCode project via number input. How to visit? Either go to https://leetvigator.vercel.app, or: Build Leetvigator locally...