From 7f0e8e36a447f251e993a7495cb9a8e9aaad49a8 Mon Sep 17 00:00:00 2001 From: Erik Schierboom Date: Fri, 16 Aug 2024 14:02:43 +0200 Subject: [PATCH] Revert "Revert "Knapsack: Make Bob a Sherpa (#2470)" (#2472)" This reverts commit 578f37a3bde48be53726747c9ce3158102bb2880. --- exercises/knapsack/instructions.md | 8 ++++---- exercises/knapsack/introduction.md | 12 +++++++----- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/exercises/knapsack/instructions.md b/exercises/knapsack/instructions.md index 3411db988..0ebf7914c 100644 --- a/exercises/knapsack/instructions.md +++ b/exercises/knapsack/instructions.md @@ -1,11 +1,11 @@ # Instructions -Your task is to determine which items to take so that the total value of his selection is maximized, taking into account the knapsack's carrying capacity. +Your task is to determine which items to take so that the total value of her selection is maximized, taking into account the knapsack's carrying capacity. Items will be represented as a list of items. Each item will have a weight and value. All values given will be strictly positive. -Bob can take only one of each item. +Lhakpa can take only one of each item. For example: @@ -21,5 +21,5 @@ Knapsack Maximum Weight: 10 ``` For the above, the first item has weight 5 and value 10, the second item has weight 4 and value 40, and so on. -In this example, Bob should take the second and fourth item to maximize his value, which, in this case, is 90. -He cannot get more than 90 as his knapsack has a weight limit of 10. +In this example, Lhakpa should take the second and fourth item to maximize her value, which, in this case, is 90. +She cannot get more than 90 as her knapsack has a weight limit of 10. diff --git a/exercises/knapsack/introduction.md b/exercises/knapsack/introduction.md index 9b2bed8b4..9ac9df596 100644 --- a/exercises/knapsack/introduction.md +++ b/exercises/knapsack/introduction.md @@ -1,8 +1,10 @@ # Introduction -Bob is a thief. -After months of careful planning, he finally manages to crack the security systems of a fancy store. +Lhakpa is a [Sherpa][sherpa] mountain guide and porter. +After months of careful planning, the expedition Lhakpa works for is about to leave. +She will be paid the value she carried to the base camp. -In front of him are many items, each with a value and weight. -Bob would gladly take all of the items, but his knapsack can only hold so much weight. -Bob has to carefully consider which items to take so that the total value of his selection is maximized. +In front of her are many items, each with a value and weight. +Lhakpa would gladly take all of the items, but her knapsack can only hold so much weight. + +[sherpa]: https://en.wikipedia.org/wiki/Sherpa_people#Mountaineering