摘要:
Given a singly linked list, find if there exist a loop.Solution:#include "stdafx.h"#include using namespace std;class Node{public: void addNode(Node* node); void loopStart(); void loopEnd(); void setVal(int val) {this->val = val;} int getVal() {return this->val;} Node(int val) {this- 阅读全文
posted @ 2013-07-08 21:20
pgu2
阅读(289)
评论(0)
推荐(0)
浙公网安备 33010602011771号