Your teaching style is awesome. I like our voice 😅
@KnowledgeCenter3 жыл бұрын
Thanks for the motivating words.
@prasantharavindramesh10783 жыл бұрын
awesome explanation.Just a small clarification.The consecutive sequence can be in any order is true but what if the consecutive sequence has duplicates like for the above example say [100,1,200,1,10,4,0,3,8,2].Here the consecutive sequence is [0,1,1,2,3,4] so i need to store the frequency also correct if input has duplicates?
@deepanrajusugavasan97623 жыл бұрын
superb bro keep uploading⭐
@KnowledgeCenter3 жыл бұрын
Thanks.
@PEEYUSHKUMARPATHAK3 жыл бұрын
Loved the explanation . Let's say we want to print the LCS, how would we achieve that? Would be interested in the java solution
@KnowledgeCenter3 жыл бұрын
Keep 2 more variables: int prev_max, next_max if ((next-prev-1) > res){ prev_max = prev; next_max = next; res = next-prev-1; } Finally print the sequence: prev+1, prev+2, ...., next-1.
@gokulnaathb26279 ай бұрын
Just beautiful
@inspired_enough_to_grow_up2 жыл бұрын
map/ set creation will also take O(n log n) right?
@gokulnaathb26279 ай бұрын
unordered_map or unordered_set creation will take only o(n) time if we want to insert n elements. map or set will take o(nlong)
@subee1285 ай бұрын
Thanks
@bestsaurabh3 жыл бұрын
Instead of unordered_set, we could have used unordered_map with O(1) lookup or it does not matter?
@navjot73972 жыл бұрын
unordered set also has O(1) lookup (average)
@indiancseresearch61092 жыл бұрын
thanks ;
@KnowledgeCenter2 жыл бұрын
You're welcome!
@syedabdul12283 жыл бұрын
Arr=[values] Max=0 for i in Arr: Maxlen=1 n=i While n=n+1 in Arr Maxlen+=1 if Max