• Programming & Tech Projects
  • October 28, 2023
  • 406 Views

Java

  • Freelancer Type Individual
  • Project Duration
  • Level Top Expert

Description

For the given example 12 is the minimum possible sum

Some hints I received for this problem is to use Kosaraju's algorithm to find labels, then build a scc (strongly connected component) graph. From there, you can calculate which routes would yield the optimal route that reduces as much edges to its minimum, and then calculate the minimum sum.


I understand this idea, but I don't know how to code it, so I'm relying on you. Hopefully this tip helps. Also, feel free to ask to change this order to a medium task.

For the code, you are using a while loop to read the inputs line by line. It's not needed. The inputs will always just be integers, so there's no need to read it as a line and will always have m+2 lines worth of inputs, with the first line being 2 inputs for value n and m, and the final line being the weights for every ai portals.

Also, there's no need to check for exceptions, so please do remove the print statements for "try again" and such.

Some hints I received for this problem is to use Kosaraju's algorithm to find labels, then build a scc (strongly connected component) graph. From there, you can calculate which routes would yield the optimal route that reduces as much edges to its minimum, and then calculate the minimum sum.


I understand this idea, but I don't know how to code it, so I'm relying on you. Hopefully this tip helps. Also, feel free to ask to change this order to a medium task.




The bin zlmszq6lrsr2c9hj was created 32 seconds ago, updated 1 second ago and it expires 6 days from now. It contains 3 uploaded files at 8.7 MB in total


Skills Required

Programming & Technology

Attachments

Login to view attachments

Project ID:FS-11044-kazi

Cyprian Ndemo
  • 1 year ago
  • 5.0 ( 17 reviews )
  • Ksh2,000.00
  • in 1 days

I'm proficient with java and am experienced in linear time algorithm. I will do a perfect job

Project Proposals (1)

Cyprian Ndemo
  • 1 year ago
  • 5.0 ( 17 reviews )
  • Ksh2,000.00
  • in 1 days

I'm proficient with java and am experienced in linear time algorithm. I will do a perfect job

Send Your Proposal

Ksh
Days
  • Estimated Total Cost

    The total project cost.

    Ksh2,000.00

  • Service Fee (2%)

    The service fee that will be deducted from your proposed amount.

  • Your Earning

    Total amount you will earn.

  • Stick this Proposal to the Top

    The sticky proposal will always be displayed on top of all the proposals.

  • Ksh12.00
  • Make Sealed Proposal

    The sealed proposal will be sent to the project author only it will not be visible publically.

  • Ksh7.00
  • Featured Proposal

    The featured proposal will have a distinctive color and popped up between other proposals to get the author's attention.

  • Ksh5.00
I agree to the terms and conditions
Budget
Ksh2,000.00
Fixed

555 Days left

Grade Master

Member since July 8, 2023
View Profile

About The Employer

  • Kenya
  • 45 Projects completed
  • Payment Method
  • Email Verified

Open Jobs

Report Project