mirror of
https://github.com/krahets/hello-algo.git
synced 2026-04-23 10:02:23 +08:00
Rename the common modules in Java, C++ and C.
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
* Author: Listening (https://github.com/L-Super)
|
||||
*/
|
||||
|
||||
#include "../include/include.h"
|
||||
#include "../utils/common.h"
|
||||
|
||||
/* 冒泡排序 */
|
||||
void bubbleSort(int nums[], int size) {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* Author: Reanon (793584285@qq.com), Guanngxu (446678850@qq.com)
|
||||
*/
|
||||
|
||||
#include "../include/include.h"
|
||||
#include "../utils/common.h"
|
||||
|
||||
/* 计数排序 */
|
||||
// 简单实现,无法用于排序对象
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* Author: Listening (https://github.com/L-Super)
|
||||
*/
|
||||
|
||||
#include "../include/include.h"
|
||||
#include "../utils/common.h"
|
||||
|
||||
/* 插入排序 */
|
||||
void insertionSort(int nums[], int size) {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* Author: Guanngxu (446678850@qq.com)
|
||||
*/
|
||||
|
||||
#include "../include/include.h"
|
||||
#include "../utils/common.h"
|
||||
|
||||
/* 合并左子数组和右子数组 */
|
||||
// 左子数组区间 [left, mid]
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* Author: Reanon (793584285@qq.com)
|
||||
*/
|
||||
|
||||
#include "../include/include.h"
|
||||
#include "../utils/common.h"
|
||||
|
||||
/* 元素交换 */
|
||||
void swap(int nums[], int i, int j) {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* Author: Reanon (793584285@qq.com)
|
||||
*/
|
||||
|
||||
#include "../include/include.h"
|
||||
#include "../utils/common.h"
|
||||
|
||||
/* 获取元素 num 的第 k 位,其中 exp = 10^(k-1) */
|
||||
int digit(int num, int exp) {
|
||||
|
||||
Reference in New Issue
Block a user