Dear Friends, If you like our content and would like us to continue making great content for you, please spread the word about IDeserve. A share/appreciation from you on social network would mean the world to us! Also, do like our Facebook page: facebook.com/IDeserve.co.in :) Thanks, -Team IDeserve.
@pawandeepchor896 жыл бұрын
Excellent explanation, cannot thank you any more. Cheers !! Keep up the good work buddy !!
@IDeserve6 жыл бұрын
Thank you so much for your kind words Praveen!
@sg1192k4 жыл бұрын
Shouldn't this be O(n^2) in the worst case? the while loop can take a lot of time if the entire set consists of consecutive numbers
@SmartProgramming6 жыл бұрын
awesome sir, easily explained, thanks a lot 👍👍👍👍🙂🙂
@IDeserve6 жыл бұрын
Thank you so much for your kind words!
@lifehacks94504 жыл бұрын
U r doing a great job please upload more
@tanishqsaluja82817 жыл бұрын
output is the length instead of being the sub-array,how to print the the sub-array ? Sub-array is updated i.e overwriting previous sub-array once updated?
@SudeeptaSood6 жыл бұрын
What is the time complexity and space complexity?
@syedmushtaq1238 жыл бұрын
Why not just sort and loop to find consecutive numbers?
@beyond-convention8 жыл бұрын
that takes o(nlog n) time complexity. in this method u only take o(n) complexity
@rahulkmr2687 жыл бұрын
The only problem is hashing! if the numbers are very large and random then this solution might create issues. Apart from that good Solution.