Implement linked list in php

后端 未结 8 670
小蘑菇
小蘑菇 2020-12-08 05:22

How should I implement a linked list in PHP? Is there a implementation built in into PHP?

I need to do a lot of insert and delete operations, and at same time I need

8条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-08 05:46

    If don't think most people understand what linked lists are. The basic idea is you want to keep data organised is such a way that you can access the previous and next node using the current node. The other features like add, delete, insert, head etc are sugar, though necessary. I think the SPL package does cover a lot. Problem is I need a PHP 5.2.9 class. Guess I've to implement it myself.

提交回复
热议问题