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. Sorting
  4. The Full Counting Sort
  5. Discussions

The Full Counting Sort

Problem
Submissions
Leaderboard
Discussions

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

  • drumgod101
    5 months ago+ 1 comment

    Very hard to understand the problem statement. Not very hard to solve.

    Explanation:

    • For each, track each digit char (arr[0])
    • For each string char (arr[1]) , associate it with the digit (arr[0]) in the tracker, keeping them in order
    • But, if point is less than midpoint or arr, insert "-" instead

    No Idea how to do it in C though. Can't even index into the correct part of the array without a seg fault occuring.

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