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..
my old precision t3600 that was my main rig till I got my current build
will post pics of the server soon but here's the drives: (Intel DCS-4500 960gb enterprise grade MLC SATA SSD for boot drive + Ironwolf Pro 14TB)
and my main rig does a backup to this every wed w luckybackup rsync/rclone frontend. mounted locally n added to fstab on the main rig and this t3600 does a nice job as being the backup rig n everything's synced.
Wow you are right, I never even noticed this until you said it! (870E Aorus Master)
Before testing this card I had a TP-Link tx401 10GbE PCIe card in that slot (now using XikeStor 310 Thunderbolt to Ethernet adapter).
Recent Achievements
DrWankel earned a badge First Post
DrWankel earned a badge Reacting Well
Supreme Spray LV earned a badge Week One Done
Genuinetonerink- Dubai earned a badge One Month Later
Genuinetonerink- Dubai earned a badge Week One Done
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