We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
  • HackerRank Home

    HackerRank

  • |
  • Prepare
  • Certify
  • Compete
  • Hiring developers?
  1. Prepare
  2. Algorithms
  3. Dynamic Programming
  4. The Blacklist
  5. Discussions

The Blacklist

Problem
Submissions
Leaderboard
Discussions
Editorial

    You are viewing a single comment's thread. Return to all comments →

  • csnmocchi
    3 years ago+ 0 comments

    Seems to be similar to a scheduling problem, which I have no experience with. How do you compare the weights between each mercenary while keeping in mind that you cannot alternate back to a previous mercenary?

    I have a hunch that this would be vaguely similar to running a modified Dijkstra's algorthm on an singlely linked list that is absurdly interconnected with K starting nodes and K ending nodes.

    So far, I've only made a basic solution that always chooses the lowest option available, but that does not take into account that a mercenary may have a better streak of low cost options latter on.

    0|
    Permalink
  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy