dequeue in Queue of Data Structure? -
i can't understand 1 paragraph when read data structure , algorithm analysis in java. can tell me?
in applications sure number of enqueues not larger capacity of queue, wraparound not necessary. stacks, dequeues performed unless calling routines queue not empty. error checks skipped operation, except in critical code. not justifiable, because time savings achieve minimal.
thanks
without seeing full context in paragraph sits, exact answer might difficult. appears saying dequeue operations performed when queue known not empty. therefore, error checks empty queue skipped operation, on basis saving time not performing check. however, time savings realized not doing empty check minimal, , risk of not checkout outweighs minimal performance gain.
in more human readable terms, when working queues (as stacks), there potential need make sure queue not empty before trying dequeue (removal) operation. check ignored on grounds saves time , boosts performance. book reading feels increase in performance small , outweighed risk of not performing empty check.
Comments
Post a Comment