Symmetric Matrix 題目連結 找是不是對稱矩陣(由中心點來鏡射) 不可以是負的 解題 a1 a2 a3 b1 b2 b3 c1 c2 c3...
客製化ChatGPT 中文繁簡體轉換,請在ChatGPT Custom instructions1.What would you like ChatGPT to...
#include <cmath> #include <cstdio> #include <vector> #include...
新增節點的方式大概可以以兩種方式來概括: 非遞迴形式:void BST::insert(int); 相對直觀 使用 while 迴圈 遞迴形式:void...
What is the Probability? 題目連結 最近剛成立一個DC群組,如果各位有興趣打題或是幫忙解惑歡迎加入會定期每禮拜開五題與不定期組內比賽也...
#include <iostream> #include <cstdio> using namespace std; int main...
#include <iostream> #include <vector> #include <map> #include...
UVA10056 ChatGPT 問題輸入: 大學程式能力檢定 UVA10056 What is the Probability!! 問題的中文與英文描述,包...
指標是 C/C++ 的靈魂,了解指標的真面目,你可以更快速認識資料結構中記憶體的操作! 指標宣告與運算 這個議題是我之前常常搞混的!有時候 * 與記憶體有關,...
#include <iostream> #include <string> using namespace std; int main...
Short Sort 題目連結點此抱歉,今天在寫 12/25 的文章時才發現我昨天根本沒有寫XD 今天來補一下 題目意思 有 a b c三張牌 只能用以下方法交...
今天,我們來解決一個問題吧! 給定一個遞增的鏈結串列,回傳一個遞減的鏈結串列。 其實,這個問題有兩個解決方法! 將原本鏈結串列的數值儲存於陣列中,再將它們以遞...
這系列是怎麼來的? 這個暑假想加強一下程式的基本功,把前年買的 C++ Primer 5th 啃一啃,然後把一些卡關的觀念跟Code紀錄一下。 這系列文章中會有...
前言 今天的主題是一個演算法的設計方式和思維,因此不會提供具體的例題或實作細節,只會探討以這種設計方式所開發的演算法,以幫助大家理解 概念 分治又稱為「各個擊破...
#include<iostream> using namespace std; class A { public: A()...
#include <cmath> #include <cstdio> #include <vector> #include...
#include <cmath> #include <cstdio> #include <vector> #include...
#include <cmath> #include <cstdio> #include <vector> #include...
在做任何事情之前,我們要先建立一個鏈結串列的物件。 int main() { SLL *sll = new SLL; DLL *dll = ne...
#include <iostream> #include <sstream> using namespace std; /* Ent...
學了二元搜尋樹的基本,那想過怎麼判斷這棵樹是不是二元搜尋樹嗎? 還記得有一個遍歷演算法叫做「中序遍歷」或 inorder traversal 嗎?用這個遍歷法...
#include <iostream> #include <cstdio> using namespace std; /* Add `...
#include <cmath> #include <cstdio> #include <vector> #include...
#include <iostream> using namespace std; /* * Create classes Rectangle a...
#include <iostream> #include <string> #include <sstream> #incl...
實作一下 linkedList::remove() 吧! 這個類別的功用是:給定一個目標值,從鏈結串列移除包含目標值的節點。 定義類別 class SLL {...
#include <bits/stdc++.h> using namespace std; string ltrim(const string &...
#include<bits/stdc++.h> using namespace std; ///////////////////////////...
#include <cmath> #include <cstdio> #include <vector> #include...
有了新增節點的類別方法,總該有一個刪除節點的類別方法吧! 刪除節點的方式有很多種,我們就從最簡單的刪除鏈結串列頭部節點開始。 定義類別 class SLL {...