From e4b4e91c6fc46d129d6165f08fd0f503c65f4353 Mon Sep 17 00:00:00 2001 From: Katrina Owen Date: Tue, 18 Apr 2023 09:11:36 +0200 Subject: [PATCH 1/2] Sync simple-linked-list docs with problem-specifications The simple-linked-list exercise has been overhauled as part of a project to make practice exercises more consistent and friendly. For more context, please see the discussion in the forum, as well as the pull request that updated the exercise in the problem-specifications repository: - https://forum.exercism.org/t/new-project-making-practice-exercises-more-consistent-and-human-across-exercism/3943 --- .../simple-linked-list/.docs/instructions.md | 21 +++++++------------ 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/exercises/practice/simple-linked-list/.docs/instructions.md b/exercises/practice/simple-linked-list/.docs/instructions.md index 1c9d0b3de9..4d845fac06 100644 --- a/exercises/practice/simple-linked-list/.docs/instructions.md +++ b/exercises/practice/simple-linked-list/.docs/instructions.md @@ -2,21 +2,14 @@ Write a simple linked list implementation that uses Elements and a List. -The linked list is a fundamental data structure in computer science, -often used in the implementation of other data structures. They're -pervasive in functional programming languages, such as Clojure, Erlang, -or Haskell, but far less common in imperative languages such as Ruby or -Python. +The linked list is a fundamental data structure in computer science, often used in the implementation of other data structures. +They're pervasive in functional programming languages, such as Clojure, Erlang, or Haskell, but far less common in imperative languages such as Ruby or Python. -The simplest kind of linked list is a singly linked list. Each element in the -list contains data and a "next" field pointing to the next element in the list -of elements. +The simplest kind of linked list is a singly linked list. +Each element in the list contains data and a "next" field pointing to the next element in the list of elements. -This variant of linked lists is often used to represent sequences or -push-down stacks (also called a LIFO stack; Last In, First Out). +This variant of linked lists is often used to represent sequences or push-down stacks (also called a LIFO stack; Last In, First Out). -As a first take, lets create a singly linked list to contain the range (1..10), -and provide functions to reverse a linked list and convert to and from arrays. +As a first take, lets create a singly linked list to contain the range (1..10), and provide functions to reverse a linked list and convert to and from arrays. -When implementing this in a language with built-in linked lists, -implement your own abstract data type. +When implementing this in a language with built-in linked lists, implement your own abstract data type. From 47631431acab973096519599c5b913329e982cb7 Mon Sep 17 00:00:00 2001 From: Katrina Owen Date: Tue, 18 Apr 2023 09:28:28 +0200 Subject: [PATCH 2/2] Sync simple-linked-list docs with problem-specifications The simple-linked-list exercise has been overhauled as part of a project to make practice exercises more consistent and friendly. For more context, please see the discussion in the forum, as well as the pull request that updated the exercise in the problem-specifications repository: - https://forum.exercism.org/t/new-project-making-practice-exercises-more-consistent-and-human-across-exercism/3943 --- .../simple-linked-list/.docs/instructions.md | 20 +++++++++++-------- .../simple-linked-list/.docs/introduction.md | 5 +++++ 2 files changed, 17 insertions(+), 8 deletions(-) create mode 100644 exercises/practice/simple-linked-list/.docs/introduction.md diff --git a/exercises/practice/simple-linked-list/.docs/instructions.md b/exercises/practice/simple-linked-list/.docs/instructions.md index 4d845fac06..04640b1fb0 100644 --- a/exercises/practice/simple-linked-list/.docs/instructions.md +++ b/exercises/practice/simple-linked-list/.docs/instructions.md @@ -1,15 +1,19 @@ # Instructions -Write a simple linked list implementation that uses Elements and a List. +Write a prototype of the music player application. -The linked list is a fundamental data structure in computer science, often used in the implementation of other data structures. -They're pervasive in functional programming languages, such as Clojure, Erlang, or Haskell, but far less common in imperative languages such as Ruby or Python. +For the prototype, each song will simply be represented by a number. +Given a range of numbers (the song IDs), create a singly linked list. + +Given a singly linked list, you should be able to reverse the list to play the songs in the opposite order. -The simplest kind of linked list is a singly linked list. -Each element in the list contains data and a "next" field pointing to the next element in the list of elements. +~~~~exercism/note +The linked list is a fundamental data structure in computer science, often used in the implementation of other data structures. -This variant of linked lists is often used to represent sequences or push-down stacks (also called a LIFO stack; Last In, First Out). +The simplest kind of linked list is a **singly** linked list. +That means that each element (or "node") contains data, along with something that points to the next node in the list. -As a first take, lets create a singly linked list to contain the range (1..10), and provide functions to reverse a linked list and convert to and from arrays. +If you want to dig deeper into linked lists, check out [this article][intro-linked-list] that explains it using nice drawings. -When implementing this in a language with built-in linked lists, implement your own abstract data type. +[intro-linked-list]: https://medium.com/basecs/whats-a-linked-list-anyway-part-1-d8b7e6508b9d +~~~~ diff --git a/exercises/practice/simple-linked-list/.docs/introduction.md b/exercises/practice/simple-linked-list/.docs/introduction.md new file mode 100644 index 0000000000..0e1df72f9b --- /dev/null +++ b/exercises/practice/simple-linked-list/.docs/introduction.md @@ -0,0 +1,5 @@ +# Introduction + +You work for a music streaming company. + +You've been tasked with creating a playlist feature for your music player application.