package
Version:
v0.0.0-...-b071cee
Opens a new window with list of versions in this module.
Published: Aug 9, 2023
License: GPL-3.0
Opens a new window with license information.
Imports: 0
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
面试题 16.01.交换数字
1. 题目描述
编写一个函数,不用临时变量,直接交换 numbers = [a, b] 中 a 与 b 的值。
示例:
输入: numbers = [1,2]
输出: [2,1]
提示:
numbers.length == 2
-2147483647 <= numbers[i] <= 2147483647
标签
位运算 数学
2. 解题
不用临时变量交换a,b
- a = a+b
- b = a-b
- a = a-b
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.