You are not logged in. Please login at to post your questions!


plz help me find the line causing the error SIGABRT (problem from shaastra comp.) Shrinking space SPACE

I have seen the same Approach getting AC. I don't understand what i am doing wrong. This is the first time i have seen this type of error. Please HELP me find my MISTAKE and help me learn THANKYOU.

asked 24 Dec '18, 21:33

vero's gravatar image

accept rate: 0%

The problem was in the custom comparator that you made. Apparently, that's not the correct/recommended (?) way to provide comparators for structs.

So, I just overloaded the < operator (along with the proper arguments, like const references) and your code passed all the test cases.

Here's the link to the corrected solution.

Note--> Your approach would've worked if you hadn't defined the structs to store strings. Instead, you could've used vector of strings and then provided the custom comparator (but only after passing the arguments as const references.)

P.S:- Next time, make sure that you include the question link and your attempted solution link in the question description.


answered 24 Dec '18, 23:19

masood786's gravatar image

accept rate: 13%

edited 25 Dec '18, 12:20

thank you for the help i will keep those points in mind while asking my questions . Again thankyou masood786

(31 Dec '18, 14:16) vero3★
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:


question asked: 24 Dec '18, 21:33

question was seen: 93 times

last updated: 31 Dec '18, 14:17