From 820bde4477f79db63bb7caf8b107486778d14970 Mon Sep 17 00:00:00 2001 From: Katrina Owen Date: Fri, 31 Mar 2023 15:04:10 +0200 Subject: [PATCH 1/2] Rework simple-linked-list documentation This PR is part of our project of making our Practice Exercises more consistent and human. For more context please see the following forum-thread: https://forum.exercism.org/t/new-project-making-practice-exercises-more-consistent-and-human-across-exercism/3943 The main change for this exercise is to put it into the context of a small story. --- exercises/simple-linked-list/description.md | 15 -------------- exercises/simple-linked-list/instructions.md | 21 ++++++++++++++++++++ exercises/simple-linked-list/introduction.md | 7 +++++++ 3 files changed, 28 insertions(+), 15 deletions(-) delete mode 100644 exercises/simple-linked-list/description.md create mode 100644 exercises/simple-linked-list/instructions.md create mode 100644 exercises/simple-linked-list/introduction.md diff --git a/exercises/simple-linked-list/description.md b/exercises/simple-linked-list/description.md deleted file mode 100644 index 8c44f677e5..0000000000 --- a/exercises/simple-linked-list/description.md +++ /dev/null @@ -1,15 +0,0 @@ -# Description - -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 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). - -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. diff --git a/exercises/simple-linked-list/instructions.md b/exercises/simple-linked-list/instructions.md new file mode 100644 index 0000000000..d6b82ab4da --- /dev/null +++ b/exercises/simple-linked-list/instructions.md @@ -0,0 +1,21 @@ +# Instructions + +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 prototype also needs to have import/export functionality. +Given the playlist as a singly linked list, you will need to be able to convert it to the data type used for the external collection. +Likewise, given a collection in the external format, you will need to import it by converting it to a singly linked list. + +~~~~exercism/note +The linked list is a fundamental data structure in computer science, often used in the implementation of other data structures. + +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. + +If you want to dig deeper into linked lists, check out [this article][intro-linked-list] that explains it using nice drawings. + +[intro-linked-list]: https://medium.com/basecs/whats-a-linked-list-anyway-part-1-d8b7e6508b9d +~~~~ diff --git a/exercises/simple-linked-list/introduction.md b/exercises/simple-linked-list/introduction.md new file mode 100644 index 0000000000..1ee38ec348 --- /dev/null +++ b/exercises/simple-linked-list/introduction.md @@ -0,0 +1,7 @@ +# Introduction + +You are a software developer at a music streaming company. + +You've been tasked with creating a playlist feature for your music player application. +The feature will need to be able to import and export playlists. +It also needs to let people reverse the order of the songs in the playlist. From 75cf5d898ee3e71902bbaf0daf4b19d3b1848bd4 Mon Sep 17 00:00:00 2001 From: Katrina Owen Date: Wed, 12 Apr 2023 12:04:52 +0200 Subject: [PATCH 2/2] Simplify simple-linked-list docs --- exercises/simple-linked-list/instructions.md | 6 ++---- exercises/simple-linked-list/introduction.md | 4 +--- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/exercises/simple-linked-list/instructions.md b/exercises/simple-linked-list/instructions.md index d6b82ab4da..04640b1fb0 100644 --- a/exercises/simple-linked-list/instructions.md +++ b/exercises/simple-linked-list/instructions.md @@ -1,14 +1,12 @@ # Instructions +Write a prototype of the music player application. + 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 prototype also needs to have import/export functionality. -Given the playlist as a singly linked list, you will need to be able to convert it to the data type used for the external collection. -Likewise, given a collection in the external format, you will need to import it by converting it to a singly linked list. - ~~~~exercism/note The linked list is a fundamental data structure in computer science, often used in the implementation of other data structures. diff --git a/exercises/simple-linked-list/introduction.md b/exercises/simple-linked-list/introduction.md index 1ee38ec348..0e1df72f9b 100644 --- a/exercises/simple-linked-list/introduction.md +++ b/exercises/simple-linked-list/introduction.md @@ -1,7 +1,5 @@ # Introduction -You are a software developer at a music streaming company. +You work for a music streaming company. You've been tasked with creating a playlist feature for your music player application. -The feature will need to be able to import and export playlists. -It also needs to let people reverse the order of the songs in the playlist.