Well they are the same you're going over an array once. As long as they are not nested they are still counted as O(n) because leading constants are dropped, at least that's what my acumen says. Need inputs on this guys!
On Friday, June 22, 2012 12:53:02 AM UTC+5:30, suzi wrote: > > single traversal n O(n) are 2 diff things...plz specify??? -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To view this discussion on the web visit https://groups.google.com/d/msg/algogeeks/-/2cjTXWrkv7wJ. 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.