Miser Travelling
CodeChefOpen on judge ↗
Mr. Seth is a miser student. He wants to earn more and spend less. He recently thought of selling a product for which he needs to visit $N$ cities. Each city is provided with a value and to travel each city Mr. Seth requires a Bus pass. So he has provided you the sequence of $N$ cities which he would be travelling and is asking you to find the minimum passes he requires to travel all the cities.
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start