Skip to content

Overriding newest solution with oldest solution #22

@rajatgoyal715

Description

@rajatgoyal715

Right now, if two or more solutions to the same problem are found, then we override the existing solution with the new one crawled. But the crawling order is from newest to oldest. So, in this case, it will override the new solution with the old solution, which is not what we want.

Steps to reproduce the behavior:

  1. This is the query we are using to get the submissions: https://www.hackerrank.com/rest/contests/master/submissions/?offset=0&limit=100
  2. Here, we traverse through the list of submissions: https://github.com/Nullifiers/Hackerrank-Solution-Crawler/blob/master/hsc/crawler.py#L85

Solution:

  1. We can reverse the order of traversing.
  2. Or, we can get the submissions in reverse order, maybe by tweaking some query parameters.

We also need to handle the offset and limit feature in this case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions