Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.
Question Solution A peak element is an element that is greater than its neighbors. Given an input array wherenum[i] ≠ num[i+1], find a peak element and return its index. The array may contain multiple peaks, in that case return the index to any one of the peaks is fine. You may ...
LeetCode476https://leetcode.com/problems/number-complement/ LeetCode477https://leetcode.com/problems/total-hamming-distance/ LeetCode693https://leetcode.com/problems/binary-number-with-alternating-bits/ LeetCode762https://leetcode.com/problems/prime-number-of-set-bits-in-binary-representation/ Leet...
1342. 将数字变成 0 的操作次数 - 给你一个非负整数 num ,请你返回将它变成 0 所需要的步数。 如果当前数字是偶数,你需要把它除以 2 ;否则,减去 1 。 示例 1: 输入:num = 14 输出:6 解释:步骤 1) 14 是偶数,除以 2 得到 7 。步骤 2) 7 是奇数,减 1 得到 6
Happy Number (medium) Middle of the LinkedList (easy) 4. Pattern: Merge Intervals,区间合并类型 区间合并模式是一个用来处理有区间重叠的很高效的技术。在设计到区间的很多问题中,通常咱们需要要么判断是否有重叠,要么合并区间,如果他们重叠的话。这个模式是这么起作用的: 给两个区间,一个是a,另外一个是b。
179 Largest Number 15.7% Medium 174 Dungeon Game 17.5% Hard 173 Binary Search Tree Iterator 29.2% Medium 172 Factorial Trailing Zeroes 28.3% Easy 171 Excel Sheet Column Number 36.6% Easy 170 Two Sum III – Data structure design 24.7% Easy 169 Majority Element 34.9% Easy 168 Excel Sheet Colum...
本人工作刚满一年,说实话工作中很顺利,遇到问题基本面向百度编程都能解决,对于基础理论这方面存在欠缺,因此希望通过 leetcode 来提高这方面的能力…显示全部 关注者46 被浏览32,973 关注问题写回答 邀请回答 好问题 1 添加评论 分享 ...
Intersection of Two Linked Lists 162. Find Peak Element 164. Maximum Gap 167. Two Sum II - Input array is sorted 168. Excel Sheet Column Title 169. Majority Element 171. Excel Sheet Column Number 172. Factorial Trailing Zeroes 173. Binary Search Tree Iterator 174. Dungeon Game 179. Largest...
DateQuestion Numbers✨ Star ! 数组和动态数组 73. Set Matrix Zeroes 48. Rotate Image 344. Reverse String 414. Third Maximum Number 448. Find All Numbers Disappeared in an Array 66. Plus One 238. Product of Array Except Self 697. Degree of an Array ...
578 Get Highest Answer Rate Question $ Medium 31.8% 579 Find Cumulative Salary of an Employee $ Hard 30.2% 580 Count Student Number in Departments $ Medium 39.3% 581 Shortest Unsorted Continuous Subarray Easy 29.3% 582 Kill Process $ Medium 47.70% 583 Delete Operation for Two Strings Medium 44...