代碼的路 -
pip安裝更換鏡像
原文鏈接
使用pip來安裝python包有時候安裝起來會非常慢,因此需要換成國內的源來加速下載:
1 單次修改源
以Torch為例,常規下載方式為:
pip install torch
修改為阿里源:
pip install -i https://mirrors.aliyun.com/pypi/simple torch
2 修改默認源
如果不想在每一次下載都指定源,可以直接修改默認源。
2.1 L
pip
,
程序員
,
Python
代碼的路 -
C++ 自定義二叉樹並輸出二叉樹圖形
原文鏈接
使用C++構建一個二叉樹並輸出。
輸入
輸入根節點為10,依次輸入6、4、8、14、12、16
代碼如下:
#include stdio.h
#include stdlib.h
#include vector
#includeiostream
#include stack
#includecstdlib
#include string
using namespace std;
s
c++
,
二叉樹
代碼的路 -
C++ 構建並複製二叉樹
原文鏈接
使用C++構建一個二叉樹並複製、輸出。
程序
#include stdio.h
#include stdlib.h
//#include cstdio
#include vector
#includeiostream
#include stack
#includecstdlib
#include string
using namespace std;
struct TreeNo
c++
,
二叉樹