Linked List Problems By Nick Parlante

Linked List Problems By Nick Parlante

简介:

本文档回顾了基本的链表代码技术,然后解决了 18 个难度各异的链表问题。最明显的是,这些问题是学习链表的一种方式。更重要的是,这些问题是培养您使用复杂指针算法的能力的一种方式。尽管现代语言和工具已经使链表对于日常编程来说变得不那么重要,但复杂指针算法的技能非常重要,而链表是培养这些技能的绝佳方式。

这些问题使用 C 语言语法,因此需要对 C 及其指针语法有基本的了解。重点是指针操作和链表算法的重要概念,而不是 C 语言的特性。

对于某些问题,我们提供了多种解决方案,例如迭代与递归、虚拟节点与本地引用。具体问题按难度大致排序为:Count、GetNth、DeleteList、Pop、InsertNth、SortedInsert、InsertSort、Append、FrontBackSplit、RemoveDuplicates、MoveNode、AlternatingSplit、ShuffleMerge、SortedMerge、SortedIntersect、Reverse 和 RecursiveReverse。

英文简介:

This document reviews basic linked list code techniques and then works through 18 linked list problems covering a wide range of difficulty. Most obviously, these problems are a way to learn about linked lists. More importantly, these problems are a way to develop your ability with complex pointer algorithms. Even though modern languages and tools have made linked lists pretty unimportant for day-to-day programming, the skills for complex pointer algorithms are very important, and linked lists are an excellent way to develop those skills.

The problems use the C language syntax, so they require a basic understanding of C and its pointer syntax. The emphasis is on the important concepts of pointer manipulation and linked list algorithms rather than the features of the C language.

For some of the problems we present multiple solutions, such as iteration vs. recursion, dummy node vs. local reference. The specific problems are, in rough order of difficulty: Count, GetNth, DeleteList, Pop, InsertNth, SortedInsert, InsertSort, Append, FrontBackSplit, RemoveDuplicates, MoveNode, AlternatingSplit, ShuffleMerge, SortedMerge, SortedIntersect, Reverse, and RecursiveReverse.

书名
Linked List Problems By Nick Parlante
语言
英语
年份
2022
页数
35页
大小
54.38 kB
标签
  • 算法
  • C语言
  • 下载
    pdf iconLinked List Problems By Nick Parlante.pdf
    密码
    65536

    最后更新:2025-04-12 23:58:19

    ←Pointers and Memory By Nick Parlante

    →Practical Object-Oriented Design in Ruby: An Agile Primer