0 votes 0 votes https://gateoverflow.in/86225/gate1990-13b for part a i think O(n^2) becz every tym we need to traverse whole chain.. ? eyeamgj asked Feb 14, 2019 eyeamgj 384 views answer comment Share Follow See all 6 Comments See all 6 6 Comments reply Show 3 previous comments eyeamgj commented Feb 14, 2019 reply Follow Share I MEAN SUPPOSE WE HAVE N ELEMENTS 10,20,30,40,..........................THEY ALL GOING TO SAME SLOT AND WE ARE GOING TO USE CHAINING SO 10 GOING TO A SLOT NO TRAVERSING TO LINK IT NOW FOR 20 WE NEED TO TRAVERSE THROUGH 10 TO PLACE 20 SIMILARY WE NEED TO PASS 10 ,20 TO PLACE 30 AND SO ON SO TOTAL WE ARE GETTING 1+2+3+..............N =O(N^2)..... 0 votes 0 votes Naveen Kumar 3 commented Feb 14, 2019 reply Follow Share we can just insert at the beginning of linked list each time if all n elements are in satisfying the same slot. why we need to pass 10 for inserting 20...nowhere in question mentioned about sorting! 1 votes 1 votes eyeamgj commented Feb 15, 2019 reply Follow Share OK GOT IT THANK U SO MUCH 0 votes 0 votes Please log in or register to add a comment.