palindrome-linked-list 1.0.0
Palindrome Linked List
Loading...
Searching...
No Matches
ListNode Struct Reference

Definition for singly-linked list. More...

Collaboration diagram for ListNode:

Public Member Functions

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

Data Fields

int val
 
ListNodenext
 

Detailed Description

Definition for singly-linked list.

Definition at line 9 of file main.cpp.

Constructor & Destructor Documentation

◆ ListNode() [1/3]

ListNode::ListNode ( )
inline

Definition at line 13 of file main.cpp.

13: val(0), next(nullptr) {}
int val
Definition main.cpp:11
ListNode * next
Definition main.cpp:12

◆ ListNode() [2/3]

ListNode::ListNode ( int  x)
inline

Definition at line 14 of file main.cpp.

14: val(x), next(nullptr) {}

◆ ListNode() [3/3]

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

Definition at line 15 of file main.cpp.

15: val(x), next(next) {}

Field Documentation

◆ next

ListNode* ListNode::next

Definition at line 12 of file main.cpp.

Referenced by delete_list(), and Solution::isPalindrome().

◆ val

int ListNode::val

Definition at line 11 of file main.cpp.

Referenced by Solution::isPalindrome().


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