![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
算法/数据结构
文章平均质量分 57
zjulbj
这个作者很懒,什么都没留下…
展开
-
Project 3: Sort Poems
Project 3: Sort Poems Harry once found an interesting ancient poem written on a long strip of paper. He decided to save this piece of art into his computer by scanning the paper segment by segment.原创 2013-03-29 23:44:08 · 661 阅读 · 0 评论 -
Harry Potter’s Exam (an application of Dijkstra algorithm)
In Professor McGonagall's class of Transfiguration, Harry Potter is learning how to transform one object into another by some spells. He has learnt that, to turn a cat into a mouse one can say docam原创 2013-03-29 23:36:26 · 766 阅读 · 0 评论 -
the algorithms to solve the question X^N
Algorithm 1:time complexity O(N) double pow(double x, long n) { if(n==0) return 1; /*when n=0 whatever the x is,the pow is 1*/ if(n==1) return x; /*when n=1 the result is x itself*/ els原创 2013-03-29 23:31:04 · 527 阅读 · 0 评论