TheAlgorithms/C++ 1.0.0
All the algorithms implemented in C++
Loading...
Searching...
No Matches
ListNode Struct Reference

for IO operations More...

Collaboration diagram for ListNode:
[legend]

Public Member Functions

 ListNode ()=default
 default constructor
 
 ListNode (int x)
 constructor with value for node->val provided
 
 ListNode (int x, ListNode *next)
 constructor with values provided for node->val and node->next
 

Public Attributes

int val {0}
 the value stored in the node
 
ListNodenext {nullptr}
 pointer to the next node
 

Detailed Description

for IO operations

for assert Definition for singly-linked list.

Definition at line 31 of file median_search2.cpp.

Constructor & Destructor Documentation

◆ ListNode() [1/2]

ListNode::ListNode ( int x)
inlineexplicit

constructor with value for node->val provided

Definition at line 35 of file median_search2.cpp.

◆ ListNode() [2/2]

ListNode::ListNode ( int x,
ListNode * next )
inline

constructor with values provided for node->val and node->next

Definition at line 37 of file median_search2.cpp.

Member Data Documentation

◆ next

ListNode* ListNode::next {nullptr}

pointer to the next node

Definition at line 33 of file median_search2.cpp.

33{nullptr};

◆ val

int ListNode::val {0}

the value stored in the node

Definition at line 32 of file median_search2.cpp.

32{0};

The documentation for this struct was generated from the following file: