add: 220116-CN (fix)
This commit is contained in:
parent
5e66e6d130
commit
fa43079db0
|
|
@ -0,0 +1,9 @@
|
|||
/**
|
||||
* Refer: 220107.cpp
|
||||
*
|
||||
* 382. Linked List Random Node
|
||||
* Given a singly linked list, return a random node's value from the linked list. Each node must have the same probability of being chosen.
|
||||
* Implement the Solution class:
|
||||
* Solution(ListNode head) Initializes the object with the integer array nums.
|
||||
* int getRandom() Chooses a node randomly from the list and returns its value. All the nodes of the list should be equally likely to be choosen.
|
||||
*/
|
||||
|
|
@ -1,4 +1,2 @@
|
|||
//
|
||||
// Created by lamha on 16/01/2022.
|
||||
//
|
||||
#include <iostream>
|
||||
|
||||
|
|
|
|||
|
|
@ -3,4 +3,4 @@ PROJECT(2201)
|
|||
|
||||
SET(CMAKE_CXX_STANDARD 23)
|
||||
|
||||
ADD_EXECUTABLE(2201 220115.cpp)
|
||||
ADD_EXECUTABLE(2201 220116.cpp)
|
||||
Loading…
Reference in New Issue