wire current capacity
nom. Cross-section | Max. permitted current rating | Max. permiited power |
---|---|---|
mm\(^2\)(Copper) | approx. A | Watt(220V) |
1.5 | 14.5 | 3190 |
2.5 | 19.5 | 4290 |
4 | 26 | 5720 |
6 | 34 | 7480 |
10 | 46 | 10120 |
nom. Cross-section | Max. permitted current rating | Max. permiited power |
---|---|---|
mm\(^2\)(Copper) | approx. A | Watt(220V) |
1.5 | 14.5 | 3190 |
2.5 | 19.5 | 4290 |
4 | 26 | 5720 |
6 | 34 | 7480 |
10 | 46 | 10120 |
给你一个数组 nums
和一个值
val
,你需要
原地
移除所有数值等于 val
的元素,并返回移除后数组的新长度。
不要使用额外的数组空间,你必须仅使用 O(1)
额外空间并
原地
修改输入数组。
元素的顺序可以改变。你不需要考虑数组中超出新长度后面的元素。
说明:
为什么返回数值是整数,但输出的答案是数组呢?
请注意,输入数组是以「引用」方式传递的,这意味着在函数里修改输入数组对于调用者是可见的。
你可以想象内部操作如下:
// nums 是以“引用”方式传递的。也就是说,不对实参作任何拷贝 int len = removeElement(nums, val); // 在函数里修改输入数组对于调用者是可见的。 // 根据你的函数返回的长度, 它会打印出数组中 该长度范围内 的所有元素。 for (int i = 0; i < len; i++) { print(nums[i]); }
示例 1:
输入:nums = [3,2,2,3], val = 3
输出:2, nums = [2,2]
解释:函数应该返回新的长度 2
, 并且 nums 中的前两个元素均为 2。你不需要考虑数组中超出新长度后面的元素。例如,函数返回的新长度为 2 ,而 nums = [2,2,3,3] 或 nums = [2,2,0,0],也会被视作正确答案。
示例 2:
输入:nums = [0,1,2,2,3,0,4,2], val = 2 输出:5, nums = [0,1,3,0,4] 解释:函数应该返回新的长度5
, 并且 nums 中的前五个元素为0
,1
,3
,0
,4
。注意这五个元素可为任意顺序。你不需要考虑数组中超出新长度后面的元素。
提示:
0 <= nums.length <= 100
0 <= nums[i] <= 50
0 <= val <= 100
In this post, we introduce the commands in CMD of Windows to connect KMS servers and activate local Windows and Office.
Autofocus methods are distinguished as active, passive, or hybrid types.
Active AF systems measure the distance to the subject independently of the optical system and subsequently adjust the optical system for correct focus. There are various ways to measure distance, including ultrasonic sound waves and infrared light.
Passive AF systems determine correct focus by performing passive analysis of the image that is entering the optical system. They generally do not direct any energy, such as ultrasonic sound or infrared light waves, toward the subject. Passive autofocusing can be achieved by phase detection or contrast measurement.
In this post, we are going to talk about Phase Detection Autofocus.
Given two numbers arr1
and arr2
in base
-2, return the result of adding them together.
Each number is given in array format: as an array of 0s and
1s, from most significant bit to least significant bit. For example,
arr = [1,1,0,1]
represents the number (-2)^3 + (-2)^2
+ (-2)^0 = -3
. A number arr
in array,
format is also guaranteed to have no leading zeros:
either arr == [0]
or arr[0] == 1
.
Return the result of adding arr1
and arr2
in
the same format: as an array of 0s and 1s with no leading zeros.
Example 1:
Input: arr1 = [1,1,1,1,1], arr2 = [1,0,1] Output: [1,0,0,0,0] Explanation: arr1 represents 11, arr2 represents 5, the output represents 16.
Example 2:
Input: arr1 = [0], arr2 = [0] Output: [0]
Example 3:
Input: arr1 = [0], arr2 = [1] Output: [1]
Constraints:
1 <= arr1.length, arr2.length <= 1000
arr1[i]
and arr2[i]
are 0
or
1
arr1
and arr2
have no leading zeros
You are given two arrays of strings that represent two inclusive events
that happened on the same day, event1
and
event2
, where:
event1 = [startTime1, endTime1]
and
event2 = [startTime2, endTime2]
.
Event times are valid 24 hours format in the form of HH:MM
.
A conflict happens when two events have some non-empty intersection (i.e., some moment is common to both events).
Return true
if there is a conflict between two events.
Otherwise, return false
.
Example 1:
Input: event1 = ["01:15","02:00"], event2 = ["02:00","03:00"] Output: true Explanation: The two events intersect at time 2:00.
Example 2:
Input: event1 = ["01:00","02:00"], event2 = ["01:20","03:00"] Output: true Explanation: The two events intersect starting from 01:20 to 02:00.
Example 3:
Input: event1 = ["10:00","11:00"], event2 = ["14:00","15:00"] Output: false Explanation: The two events do not intersect.
Constraints:
evnet1.length == event2.length == 2.
event1[i].length == event2[i].length == 5
startTime1 <= endTime1
startTime2 <= endTime2
HH:MM
format.
You are given a string text
. You should split it to k
substrings (subtext1, subtext2, ...,
subtextk)
such that:
subtexti
is a non-empty string.
text
(i.e., subtext1 + subtext2 + ... +
subtextk == text
).
subtexti == subtextk - i + 1
for all
valid values of i
(i.e., 1 <= i <= k
).
Return the largest possible value of k
.
Example 1:
Input: text = "ghiabcdefhelloadamhelloabcdefghi" Output: 7 Explanation: We can split the string on "(ghi)(abcdef)(hello)(adam)(hello)(abcdef)(ghi)".
Example 2:
Input: text = "merchant" Output: 1 Explanation: We can split the string on "(merchant)".
Example 3:
Input: text = "antaprezatepzapreanta" Output: 11 Explanation: We can split the string on "(a)(nt)(a)(pre)(za)(tep)(za)(pre)(a)(nt)(a)".
Constraints:
1 <= text.length <= 1000
text
consists only of lowercase English characters.
来介绍一下如何在\(\LaTeX\)中写中文的两种方法。
将两个升序链表合并为一个新的 升序 链表并返回。新链表是通过拼接给定的两个链表的所有节点组成的。
示例 1:
输入:l1 = [1,2,4], l2 = [1,3,4] 输出:[1,1,2,3,4,4]
示例 2:
输入:l1 = [], l2 = [] 输出:[]
示例 3:
输入:l1 = [], l2 = [0] 输出:[0]
提示:
[0, 50]
-100 <= Node.val <= 100
l1
和 l2
均按 非递减顺序 排列
给定一个由 整数 组成的 非空 数组所表示的非负整数,在该数的基础上加一。
最高位数字存放在数组的首位, 数组中每个元素只存储单个数字。
你可以假设除了整数 0 之外,这个整数不会以零开头。
示例 1:
输入:digits = [1,2,3] 输出:[1,2,4] 解释:输入数组表示数字 123。
示例 2:
输入:digits = [4,3,2,1] 输出:[4,3,2,2] 解释:输入数组表示数字 4321。
示例 3:
输入:digits = [0] 输出:[1]
提示:
1 <= digits.length <= 100
0 <= digits[i] <= 9