Update search/median_search2.cpp

Co-authored-by: David Leal <halfpacho@gmail.com>
This commit is contained in:
weiss-ben 2022-09-15 19:47:59 +03:00 committed by GitHub
parent 7c71be9707
commit da0c875504
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,11 +22,11 @@
* Definition for singly-linked list. * Definition for singly-linked list.
*/ */
struct ListNode { struct ListNode {
int val; // The value stored in the node int val; ///< the value stored in the node
ListNode *next; // Pointer to the next node ListNode *next; ///< pointer to the next node
ListNode() : val(0), next(nullptr) {} // Default constructor ListNode() : val(0), next(nullptr) {} ///< default constructor
ListNode(int x) : val(x), next(nullptr) {} // Constructor with value for node->val provided ListNode(int x) : val(x), next(nullptr) {} ///< constructor with value for node->val provided
ListNode(int x, ListNode *next) : val(x), next(next) {} // Constructor with values provided for node->val and node->next ListNode(int x, ListNode *next) : val(x), next(next) {} ///< constructor with values provided for node->val and node->next
}; };
#include <iostream> /// for IO operations #include <iostream> /// for IO operations