摘要:
1、c语言实现 // 算法实现原则 // 例如五个元素,就要排序4趟 // 每趟都是相邻的两个元素再比较 // 每趟都会把最大的那个元素往最后移 void bubbleSort(int arr[], int len){ for(int j=0;j<len-1;j++){ int swap; for 阅读全文
摘要:
堆栈 满足先进后出原则 1、python 描述 # 堆栈 先进后出原则 MAXSTACK = 10 global stack stack = [None] * MAXSTACK top = -1 def is_empty(): if top == -1: return True else: retu 阅读全文
摘要:
java 线程 一、线程状态 1、new: 线程使用new方法创建之后 调用start()方法之前 2、runnable: 线程调用start() 方法之后 3、non runnable: 线程被挂起或发生阻塞而产生的状态,例如 线程调用sleep() 线程调用wait() ps. 再次调用noti 阅读全文