mirror of
https://github.com/krahets/hello-algo.git
synced 2025-11-02 12:58:42 +08:00
Polish the chapter of array and linkedlist
This commit is contained in:
@ -5,7 +5,7 @@
|
||||
namespace hello_algo.chapter_array_and_linkedlist;
|
||||
|
||||
public class array {
|
||||
/* 随机返回一个数组元素 */
|
||||
/* 随机访问元素 */
|
||||
public static int randomAccess(int[] nums) {
|
||||
Random random = new();
|
||||
// 在区间 [0, nums.Length) 中随机抽取一个数字
|
||||
|
||||
Reference in New Issue
Block a user