Problem Description link
but if you solve it by iterative way then may you can get Time Limit Exit .
So you need to use any faster sort algorithm also you can use priority queue to solve this problem easily .
Algorithm:
This problem is easy just read carefully . In this problem need only sort the value and print sorted value.but if you solve it by iterative way then may you can get Time Limit Exit .
So you need to use any faster sort algorithm also you can use priority queue to solve this problem easily .
No comments:
Post a Comment
Write your comment - Share Knowledge and Experience