This article presents how to solve Josephus problem by cycle linked list and heap memory method in c++, and expounds the superiority of this method to that of the array.
利用C++中的堆内存原理,采用循环链表方法很好地解决了约瑟芬问题,并阐述了此方法与数组方法相比的优越性。
To cope with the problem of heap memory leak,this paper presents a dynamic memory leak check technology based on red-black tree.
设计与实现一个轻量级的堆内存泄漏检测工具,针对使用C++编码的开源代码,通过重载new,delete运算符,动态跟踪程序在执行过程中堆内存块的分配释放情况,在程序运行结束时给出内存泄露的检测结果。