作者: Dung “Zung” Nguyen , Stephen B. Wong
关键词:
摘要: Drawing on Merritt's divide-and-conquer sorting taxonomy [1], we model comparison-based as an abstract class with a template method to perform the sort by relegating splitting and joining of arrays its concrete subclasses. Comparison objects is carried out via ordering strategy. This reduces code complexity simplifies analyses various algorithms. Performance measurements visualizations can be added without modifying any utilizing decorator design pattern. object-oriented not only provides student way unifying seemingly disparate algorithms but also help him/her differentiate them at proper level abstraction.