Question: (In Java) Imagine that you work in a courier company and you have six packages you need to deliver. You don't know the weights of
(In Java)
Imagine that you work in a courier company and you have six packages you need to deliver. You don't know the weights of packages and you are too tired to deliver them all, you want to postpone four of them.
The weight of packages are given like following: {2, 5, 12, 8, 10, 9}
Design and implement a way of finding the minimum two minimum weights, sum up them, and display. While finding these weights, make sure that you are using one searching and one sorting algorithm. You should also write your design in a few sentences as a comment.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
