原创 ubuntu 下修復U盤read-Only問題

參考文獻,順便自己收藏一下 https://blog.csdn.net/ITBigGod/article/details/79914534 df -h 查看U盤掛載情況 sudo umount /media/zoutao/disk sud

原创 輸入兩個整數值,判斷兩個整數哪一位比特不同,

#include <stdio.h> #include <stdlib.h> //顯示兩個整數int哪一個比特值不同 void CountBitDiff(int n, int m) { int a[8] = {0};

原创 C++11 實現單生產者單消費者模型

#include <queue> #include <chrono> #include <mutex> #include <thread> #include <iostream> #include <condition_variable

原创 vscode 默認setting.json配置

{ // Controls whether the diff editor shows changes in leading or trailing whitespace as diffs. "diffEditor.ignoreTr

原创 C/C++ 條件編譯

1:爲什麼要條件編譯      —般情況下,C語言源程序中的每一行代碼.都要參加編譯。但有時候出於對程序代碼優化的考慮.希望只對其中一部分內容進行編譯.此時就需要在程序中加上條件,讓編譯器只對滿足條件的代碼進行編譯,將不滿足條件的代碼捨棄

原创 輸入一個整數,輸出該數二進制表示中1的個數。其中負數用補碼錶示。

class Solution { public: int NumberOf1(int n) { int index=1; int num = 0; while(ind

原创 按值查找之折半查找

折半查找作爲一種高效的查找方法,不應該不掌握它 廢話少說 !上碼   #include <iostream> using namespace std; int Binary_find(int *arr,int len,int val

原创 博客第一篇 來一個世界語*——*

#include<iostream> using namespace std; int main() {     cout<<"hello SCDN"<<endl;    return 0; }

原创 快速排序之挖坑法

快速排序作爲經典十大算法之一  其思想分而治之更是以後編程的啓發 快速排序有多種寫法 但是“挖坑填坑”在我看來是一種最容易理解的一種 首先找一個key值和挖一個坑 然後依次從右往左或者從左到右找比key值大的或者小的 交換“坑”依次循環直