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
  • Prepare
    NEW
  • Certify
  • Compete
  • Career Fair
  • Hiring developers?
  1. Prepare
  2. Algorithms
  3. Search
  4. King Richard's Knights
  5. Discussions

King Richard's Knights

Problem
Submissions
Leaderboard
Discussions
Editorial

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

  • martinpsaier
    6 years ago+ 1 comment

    I bought the test case #3 to look at the input... It's a file bigger than 8 MB. How should it be possible to read in the input, compute and put out the resut in less than 4 seconds? I tried to optimize it, but it's still O(n^2) running time... The only correct test is #1, all the others are out of time. I'm a beginner, what could I do to do it better?

    1|
    Permalink
  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy
  • Request a Feature