二项堆能在Ologn 的时间内支持最坏情况的堆支持操作INSERT,MINUMUM,EXXTRACT-MIN,UNION.
二叉堆最坏情况时间下合并两个二叉堆需要O(n) 所以二项堆优于二叉堆
斐波那契堆对于二项堆有所改进。用平摊时间计算性能。INSERT,MINIMUM,UNION,DECREASE-KEY 需要O(1),extract-min,delete 需要O(logn)
Tuesday, December 29, 2015
Maven tips
build a new maven project:
mvn archetype:generate -DgroupId=com.mycompany.helloworld -DartifactId=helloworld -Dpackage=com.mycompany.helloworld -Dversion=1.0-SNAPSHOT
cd helloworld
mvn package
java -cp target/helloworld-1.0-SNAPSHOT.jar com.mycompany.helloworl
help to get more information
mvn help:effective-pom
clean the target folder
mvn clean
mvn compile
mvn test
mvn install
mvn compile
mvn test
mvn install
Wednesday, December 2, 2015
Subscribe to:
Posts (Atom)