学习PHP中,学习完语法,开始尝试实现数据结构,今天实现单链表 <?php class node //节点的数据结构 { public $id; public $name; public $next; public function __construct($id,$name) //构造函数 { $this->id=$id; $this->name=$name; $this->next=null; } } class linklist //链表的数据结构 { private $he…
// // main.c // gfhjhgdf // // Created by chenhao on 13-12-23. // Copyright (c) 2013年 chenhao. All rights reserved. // #include"stdio.h" #include <stdlib.h> typedefstruct List_Node{ int info; struct List_Node *next; }node; //链表长度 int C…