![]() |
linked-list-cycle 1.0.0
Linked List Cycle
|
#include <bits/stdc++.h>
Go to the source code of this file.
Data Structures | |
| struct | ListNode |
| Definition for singly-linked list. More... | |
| class | Solution |
Functions | |
| ListNode * | create_list (const vector< int > &array, int pos) |
| void | print_list (ListNode *head) |
| void | delete_list (ListNode *head, set< ListNode * > *handled=NULL) |
| int | main () |
| ListNode * create_list | ( | const vector< int > & | array, |
| int | pos | ||
| ) |
Definition at line 15 of file main.cpp.
References ListNode::next.
Referenced by main().
Definition at line 52 of file main.cpp.
References delete_list(), and ListNode::next.
Referenced by delete_list(), and main().
| int main | ( | ) |
Definition at line 112 of file main.cpp.
References create_list(), delete_list(), Solution::hasCycle(), and print_list().
| void print_list | ( | ListNode * | head | ) |
Definition at line 36 of file main.cpp.
References ListNode::next, and ListNode::val.
Referenced by main().