mirror of
https://github.com/krahets/hello-algo.git
synced 2025-11-01 20:12:07 +08:00
Rename the common modules in Java, C++ and C.
This commit is contained in:
@ -4,7 +4,7 @@
|
||||
* Author: Krahets (krahets@163.com)
|
||||
*/
|
||||
|
||||
#include "../include/include.hpp"
|
||||
#include "../utils/common.hpp"
|
||||
|
||||
/* 冒泡排序 */
|
||||
void bubbleSort(vector<int> &nums) {
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* Author: Krahets (krahets@163.com)
|
||||
*/
|
||||
|
||||
#include "../include/include.hpp"
|
||||
#include "../utils/common.hpp"
|
||||
|
||||
/* 桶排序 */
|
||||
void bucketSort(vector<float> &nums) {
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* Author: Krahets (krahets@163.com)
|
||||
*/
|
||||
|
||||
#include "../include/include.hpp"
|
||||
#include "../utils/common.hpp"
|
||||
|
||||
/* 计数排序 */
|
||||
// 简单实现,无法用于排序对象
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* Author: Krahets (krahets@163.com)
|
||||
*/
|
||||
|
||||
#include "../include/include.hpp"
|
||||
#include "../utils/common.hpp"
|
||||
|
||||
/* 插入排序 */
|
||||
void insertionSort(vector<int> &nums) {
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* Author: Krahets (krahets@163.com)
|
||||
*/
|
||||
|
||||
#include "../include/include.hpp"
|
||||
#include "../utils/common.hpp"
|
||||
|
||||
/* 合并左子数组和右子数组 */
|
||||
// 左子数组区间 [left, mid]
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* Author: Krahets (krahets@163.com)
|
||||
*/
|
||||
|
||||
#include "../include/include.hpp"
|
||||
#include "../utils/common.hpp"
|
||||
|
||||
/* 快速排序类 */
|
||||
class QuickSort {
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
* Author: Krahets (krahets@163.com)
|
||||
*/
|
||||
|
||||
#include "../include/include.hpp"
|
||||
#include "../utils/common.hpp"
|
||||
|
||||
/* 获取元素 num 的第 k 位,其中 exp = 10^(k-1) */
|
||||
int digit(int num, int exp) {
|
||||
|
||||
Reference in New Issue
Block a user