行逻辑链接,带行链接信息.程序有空指针BUG,至今未解决.还是C/C++适合描述算法数据结构.以后复杂的算法还是改用C/C++吧. 有BUG的代码,总有一天会换成没有BUG的. package 行逻辑链接的顺序表实现稀疏矩阵的相乘; public class Triple<T> { int row,col; T v; public Triple(){} public Triple(int row,int col, T v){ this.row = row; this.col = col; th…
1.实现栈: stack=[] def pushit(): stack.append(raw_input('Enter New String:').strip()) def popit(): if len(stack)==0: print 'can not pop anything from a empty stack' else: print 'Remove[',repr(stack.pop()),']' def viewstack(): print stack CMDs={'u':pushi…