@don,@gene: i know the pros of using it.....but pbm occurs when we see pbm LIST-SEARCH(l,k) x <- next[nil[l]] //nil[l] denotes the sentinel node while x != nil[l] and key[x] != k x <- next[x] return x
....here to eliminate extra comparison (x != nil[l] ) in while loop , we will use sentinel and will put value to search in data field of sentinel...but if value to be searched is not found in ll then it will return the address of sentinel which is non-null. So how will i diff. whether value is found or not except to remember the address of sentinel. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.