欢迎来到软体技术部落格,这里是 React、JavaScript 及技术技能的知识文章页面。无论是在寻找关于monorepo 的技术、zustand 的状态管理技巧,还是希望加强对前端开发的理解,这里都有丰富的资源。每篇文章都精心撰写,旨在提供清晰、易于理解的内容,帮助大家快速找到所需资讯。从基本概念到进阶技巧,无论是初学或是进阶,这里都有适合大家的内容。如果对于图文式内容有兴趣,也可以参考我们 Instagram。
[LeetCode] 0040. Combination Sum II
Given a collection of candidate numbers (candidates) and a target number (target), find all unique combinations in candidates where the candidate numbers sum to target.
Each number in candidates may only be used once in the combination.
Note: The solution set must not contain duplicate combinations.
[LeetCode] 0039. Combination Sum
Given an array of distinct integers candidates and a target integer target, return a list of all unique combinations of candidates where the chosen numbers sum to target. You may return the combinations in any order.
The same number may be chosen from candidates an unlimited number of times. Two combinations are unique if the frequency of at least one of the chosen numbers is different.
The test cases are generated such that the number of unique combinations that sum up to target is less than 150 combinations for the given input.
[LeetCode] 1143. Longest Common Subsequence
Given two strings text1 and text2, return the length of their longest common subsequence. If there is no common subsequence, return 0.
A subsequence of a string is a new string generated from the original string with some characters (can be none) deleted without changing the relative order of the remaining characters.
For example, “ace” is a subsequence of “abcde”.
A common subsequence of two strings is a subsequence that is common to both strings.
[LeetCode] 0300. Longest Increasing Subsequence
Given an integer array nums, return the length of the longest strictly increasing subsequence
[LeetCode] 0070. climbing stairs
You are climbing a staircase. It takes n steps to reach the top.
Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?
[LeetCode] 0268. Missing Number
Given an array nums containing n distinct numbers in the range [0, n], return the only number in the range that is missing from the array.
[LeetCode] 0338. Counting Bits
Given an integer n, return an array ans of length n + 1 such that for each i (0 <= i <= n), ans[i] is the number of 1's in the binary representation of i.
初步认识资料结构:程式新手应该知道什么?三大学习技巧一次看!
学习程式设计时,常常听到「资料结构」这个词。它到底是什么?为什么要学?又该如何开始?这篇文章将用简单的比喻和实用的例子,帮助你快速了解资料结构的基础概念,让你能轻松入门! 😊
[LeetCode] 0191. Number of 1 Bits
Write a function that takes the binary representation of an unsigned integer and returns the number of '1' bits it has (also known as the Hamming weight).
Note:
Note that in some languages, such as Java, there is no unsigned integer type. In this case, the input will be given as a signed integer type. It should not affect your implementation, as the integer's internal binary representation is the same, whether it is signed or unsigned.
In Java, the compiler represents the signed integers using 2's complement notation. Therefore, in Example 3, the input represents the signed integer. -3.
[LeetCode] 0371. sum of two integers
Given two integers a and b, return the sum of the two integers without using the operators + and -.
[LeetCode] 0152. Maximum Product Subarray
Given an integer array nums, find a subarray that has the largest product, and return the product.
The test cases are generated so that the answer will fit in a 32-bitinteger.
[LeetCode] 0011. Container With Most Water
You are given an integer array height of length n. There are n vertical lines drawn such that the two endpoints of the ith line are (i, 0) and (i, height[i]).
Find two lines that together with the x-axis form a container, such that the container contains the most water.
Return the maximum amount of water a container can store.
Notice that you may not slant the container.
[LeetCode] 0259. 3Sum Smaller
Given an array of n integers nums and an integer target, find the number of index triplets i, j, k with 0 <= i < j < k < n that satisfy the condition nums[i] + nums[j] + nums[k] < target.
[工程师访谈] 硬体伺服器验证工程师经验分享
访者背景介绍:
1. 纬颖:伺服器验证工程师Machine
2. 学历背景:四大管院研究所
3. 工作内容:针对研发单位设计出来的伺服器服务进行品质验证、除错并确保产品符合客户的需求与规格,在实际运作上保持稳定性与正确性
[LeetCode] 0016. 3Sum Closest
Given an integer array nums of length n and an integer target, find three integers in nums such that the sum is closest to target.
Return the sum of the three integers.
You may assume that each input would have exactly one solution.
[LeetCode] 0015. 3Sum
Given an integer array nums, return all the triplets [nums[i], nums[j], nums[k]] such that i != j, i != k, and j != k, and nums[i] + nums[j] + nums[k] == 0.
Notice that the solution set must not contain duplicate triplets
[LeetCode] 0033. Search in Rotated Sorted Array
There is an integer array nums sorted in ascending order (with distinct values).
Prior to being passed to your function, nums is possibly rotated at an unknown pivot index k (1 <= k < nums.length) such that the resulting array is [nums[k], nums[k+1], ..., nums[n-1], nums[0], nums[1], ..., nums [k-1]] (0-indexed). For example, [0,1,2,4,5,6,7] might be rotated at pivot index 3 and become [4,5,6,7,0, 1,2]. Given the array nums after the possible rotation and an integer target, return the index of target if it is in nums, or -1 if it is not in nums. You must write an algorithm with O(log n) runtime complexity.
[LeetCode] 0153. find minimum in rotated sorted array
Suppose an array of length n sorted in ascending order is rotated between 1 and n times. For example, the array nums = [0,1,2,4,5,6,7] might become:
[4,5,6,7,0,1,2] if it was rotated 4 times.
[0,1,2,4,5,6,7] if it was rotated 7 times.
Notice that rotating an array [a[0], a[1], a[2], …, a[n-1]] 1 time results in the array [a[n-1], a[0], a [1], a[2], …, a[n-2]].
Given the sorted rotated array nums of unique elements, return the minimum element of this array.
You must write an algorithm that runs in O(log n) time.
[LeetCode] 0053. Maximum Subarray
Given an integer array nums, find the subarray with the largest sum, and return its sum.