Hii can you tell me what is wrong imy code this is answer dor hackereank question
One test case is not getting solved please have a look
Hii can you tell me what is wrong imy code this is answer dor hackereank question
One test case is not getting solved please have a look
@Ankit003 hii you had solved my previous query can you help me int his question too no one has replied till now
hi @AyushKumar9032 you said one test case is failing but when I submitted 12/13 test cases failed. That might be because the way you are “sorting” the strings is wrong. You can simply use sort() function for that anyway. Secondly why is your input loop starting from 1 instead of 0? Third, when you are checking if the columns are sorted or not, it doesnt have to be strictly increasing. They just have to be in alphabetical order. So, your condition should not have equality sign. https://ide.codingblocks.com/s/223530 I made the changes here, all test cases are passing for this code.
okay thanks basically it was greedy problem but i was facing implementation part i had sorted the array but gave you wrong link of my answer but also thanks a lot. i had messaged you about a problem
maximum sum points on a straight line in that i am facing a dry run problem in that i will mark it