OSDN Git Service

fix(ds): link-list.md
authorslanterns <slanterns.w@gmail.com>
Fri, 1 May 2020 19:57:42 +0000 (03:57 +0800)
committerslanterns <slanterns.w@gmail.com>
Fri, 1 May 2020 19:57:42 +0000 (03:57 +0800)
commitd489cd5e8958470c94d14bdf91bf74754feb898b
treebb523bffcff0edcb7232f483f545d369de2f788d
parentcbd4c09857c816cdb1ff49f7709a896321dabf00
fix(ds): link-list.md

- Remove an unnecessary assignment
- Add a reference to let changes on `p` take effect outside the function
- Free the `Node` after deletion to avoid potential memory leak

Thanks for the help of @TechCiel and @mcfxmcfx.
docs/ds/linked-list.md