Alright, I already passed a basic Algorithms course in school, but a friend who's taking it needs help with an exercise. I can't for the life of me figure out a simple way to do this... it is being made using a flowchart-generator, not a real programming language, so I can't access any advanced functions. This is the scenario:
You have to chose the cheapest, most efficient way to get somewhere. Now, assume the following price lists:
1 KM: $12
2 KM: $21
3 KM: $31
4 KM: $40
5 KM: $49
6 KM: $58
7 KM: $69
8 KM: $79
9 KM: $90
10KM: $101
So for example, the cheapest way to get a 15 KM trip would be to pay for a 3 KM trip and two 6 KM ones. What would the algorithm for this be like? I'm having a hard time with it..
Sparkle 2.20.0 by Razvan Serea
Sparkle is a free, open-source Windows optimization tool designed to make your PC faster, cleaner, and more private. With Sparkle, you can easily debloat Windows by removing unnecessary apps and services, disable Microsoft tracking to enhance privacy, and apply performance tweaks to boost speed. Its cleaner removes junk and temporary files, while every change is safe and fully reversible. Sparkle also features a modern, user-friendly interface with automatic updates, making system maintenance simple. Explore over 39 tweaks, from disabling telemetry and hibernation to optimizing network and game settings, all aimed at customizing and enhancing your Windows experience.
Sparkle supports Windows 10 and 11.
Sparkle 2.20.0 changelog:
Debloat Tweak has animated border
New homepage loading UI
New Tweak Modal (Markdown Supported)
Refactored GPU Detection
Added Tests with vitest
Added foobar2000 to apps
Added Localsend to apps
Updated Modal Styles
Added styles for disabled inputs
Added Animated Border to debloat-windows tweak
Bumped dependencies
Refactor System info logic for speed
Tweak info modals now support Markdown
Added Clear System info cache to settings
Redesigned Home Page Loading UI
Changed Some Icons around the app
Download: Sparkle 2.20.0 | Portable | ~100.0 MB (Open Source)
Links: Sparkle Website | Github | Screenshot
Get alerted to all of our Software updates on Twitter at @NeowinSoftware
Question
Ajapi
Alright, I already passed a basic Algorithms course in school, but a friend who's taking it needs help with an exercise. I can't for the life of me figure out a simple way to do this... it is being made using a flowchart-generator, not a real programming language, so I can't access any advanced functions. This is the scenario:
You have to chose the cheapest, most efficient way to get somewhere. Now, assume the following price lists:
So for example, the cheapest way to get a 15 KM trip would be to pay for a 3 KM trip and two 6 KM ones. What would the algorithm for this be like? I'm having a hard time with it..
Thanks in advance!
Link to comment
https://www.neowin.net/forum/topic/699252-algorithm-help/Share on other sites
16 answers to this question
Recommended Posts