摘要: package data2; import java.util.Arrays;//导入标准库 public class data2 { public static void main(String[] args) { int[] ns = { 1, 16, 10, 16, 66 }; //for循环 阅读全文
posted @ 2020-01-01 09:30 慕尘墨染 阅读(134) 评论(0) 推荐(0)
摘要: 1、 import java.util.Scanner;//导入输入类 public class Hello { public static void main(String[] args) { int x = 10; System.out.print(x);//输出但不换行 System.out. 阅读全文
posted @ 2019-12-30 13:18 慕尘墨染 阅读(229) 评论(0) 推荐(0)
摘要: 一、 #include <iostream> using namespace std; class MyStack { private: char *m_pBuffer; //栈空间指针 int m_iSize; //栈容量 int m_iTop; //栈顶,栈中元素个数 public: MySta 阅读全文
posted @ 2019-11-21 15:24 慕尘墨染 阅读(188) 评论(0) 推荐(0)
摘要: #include <iostream> using namespace std; class Node { public: int data;//节点数据 Node *next; void printNode() { cout << data <<endl; } }; class List { pr 阅读全文
posted @ 2019-11-21 15:11 慕尘墨染 阅读(282) 评论(0) 推荐(0)
摘要: 一、前序排列 void PreorderTraversal(Tree T)//前序遍历 { if( T ) { cout<<T->index <<" "<<T->data<<endl;//根 PreorderTraversal(T->pLChild);//左 PreorderTraversal(T- 阅读全文
posted @ 2019-11-13 21:35 慕尘墨染 阅读(581) 评论(0) 推荐(0)
摘要: 一、 #include <iostream> using namespace std; class Node { public: int index;//节点索引 int data;//节点数据 Node *pLChild;//左孩子 Node *pRChild;//右孩子 Node *pParen 阅读全文
posted @ 2019-11-13 20:53 慕尘墨染 阅读(167) 评论(0) 推荐(0)