原创 字符串中單詞置逆

#include<iostream> using namespace std; char* RevStr(char *src) { char *start = src, *end = src, *ptr = src; whi

原创 牛客AI模擬面試2測開崗

簡單解釋一下黑盒與白盒測試方法 黑盒測試: 黑盒測試也稱功能測試或數據驅動測試,它是在已知產品所應具有的功能,通過測試來檢測每個功能是否都能正常使用,在測試時,把程序看作一個不能打開的黑盆子,在完全不考慮程序內部結構和內部特性的情

原创 手寫strcpy函數

#include<iostream> using namespace std; char* strcpy(char *strSrc, char *strDest) { if ((strSrc == NULL) || (strD

原创 整數轉化爲字符串

#include<iostream> using namespace std; void int2str(int n, char *str) { char buf[10] = " "; int i = 0; int len

原创 百度測開一面

面試問題來源於牛客網,然後自己去網上搜了一些資料應對這些問題 https://www.nowcoder.com/discuss/361957?type=post&order=hot&pos=&page=1&subType=2 兩個

原创 百度測開二三面

面經問題來自https://www.cnblogs.com/Finding-bugs/p/11226187.html 以下是網上搜集的部分資料 文化基因算法 化基因算法用局部啓發式搜索來模擬由大量專業知識支撐的變異過程,是一種基於

原创 Sort的三參數用法

原文地址:http://www.manongjc.com/article/79574.html 在做劍指offer時理解不了sort三參數的用法,看到這篇文章覺得講得很好 通俗說明用法: c++中的sort函數一般用來對數組進行排

原创 字符串轉化爲數字

#include<iostream> using namespace std; int str2int(const char *str) { int temp = 0; const char *ptr = str; if

原创 計算一個數的二進制中有幾個bit是1

#include<stdio.h> #define BIT31 (0x1<<31) int calculate(unsigned int c) { int count = 0; int i = 0; unsi

原创 帶頭結點單鏈表操作(數據結構)

#include<iostream> using namespace std; typedef struct node { int data; node *next; }node; node* create()

原创 手寫memcpy函數

#include<iostream> #include<cassert> using namespace std; void *memcpy2(void *memTo, const void *memFrom, size_t s

原创 手寫strstr

#include<iostream> #include<cassert> using namespace std; const char *strstr(const char* src, const char* sub) {

原创 MySQL服務無法啓動

1首先應該試試大家都在說的解法 (檢查MySQL的目錄,如果已經有data文件了就先把data刪掉) 2.我試了之後,前幾部都和上圖一樣,但最後啓動失敗 然後 mysqld --console 發現報錯了,注意到了裏面提出了

原创 文件排序輸出

#include<iostream> #include<fstream> #include<vector> using namespace std; void Order(vector<int>& data) { int cou

原创 C++基礎部分

此文是本人在牛客網複習C++摘抄的C++面試寶典電子版。 原文鏈接 https://www.nowcoder.com/tutorial/93/3e889999205d447daad9ec50a6f85d85 C和C++的區別