173 reputation
9
bio website
location
age 18
visits member for 1 year, 11 months
seen Apr 12 at 14:24

Jul
2
awarded  Curious
Nov
29
comment Evaluate all pair combinations in an array for a condition in n log n time complexity
@ratchetfreak The Binary Search approach worked perfectly. Thanks!
Nov
29
accepted Evaluate all pair combinations in an array for a condition in n log n time complexity
Nov
28
awarded  Informed
Nov
28
revised Evaluate all pair combinations in an array for a condition in n log n time complexity
added 239 characters in body
Nov
28
comment Evaluate all pair combinations in an array for a condition in n log n time complexity
I've tried that approach. Sort the array, find where a+b<k then add indice of a to solution. But the process still has to go through n-1 'b's to check for each of them. It's better but still doesn't improve the worst case.
Nov
28
comment Evaluate all pair combinations in an array for a condition in n log n time complexity
How about the particular condition X in the problem?
Nov
28
revised Evaluate all pair combinations in an array for a condition in n log n time complexity
deleted 4 characters in body
Nov
28
asked Evaluate all pair combinations in an array for a condition in n log n time complexity
Dec
28
accepted Number Game Algorithm
Dec
26
comment Rearranging Cartons Algorithm
@KarlBielefeldt Thanks for the tip! Still, incorrect algorithm. Gives incorrect output for the test case - O={1,2,3,4,5,6} R={6,5,4,3,2,1}. Output - 9 (Should be 15)
Dec
26
comment Rearranging Cartons Algorithm
An algorithm with a O(n^2) time complexity is just not efficient enough to solve the data ranges in the time limit. The most efficient algorithm for this possesses O(n log n) time, see - stackoverflow.com/questions/7797540/…. The algorithm provided resorts to O(n^2) complexity as it finds oldindex(c) with every iteration.
Dec
26
accepted Domino Solitaire Algorithm
Dec
26
comment Rearranging Cartons Algorithm
Thanks a lot! :D @PetarMinchev I believe both the problem are the same at the root level. I'll study the solution to that problem, meanwhile, what's the protocol to follow if you find an answer in a comment?
Dec
26
comment Rearranging Cartons Algorithm
Reason for down-voting? @ratchetfreak I find bubblesort per se inefficient. I am trying to find an algorithm that can handle such large data-sets in an efficient way.
Dec
25
asked Rearranging Cartons Algorithm
Dec
25
comment Training Camp Algorithm
Your approach is really good, but has a few flaws. Building on your approach...
Dec
24
comment Training Camp Algorithm
Source - INOI 2011 Q Paper
Dec
24
asked Training Camp Algorithm
Dec
24
revised Domino Solitaire Algorithm
added 2 characters in body