Skip to content

Commit 42f4840

Browse files
curtishdkrahets
andauthored
Fix all the incorrect comment in kotin files (krahets#1176)
* feat(kotlin): add kotlin code for utils file. * Update ListNode.kt * Update PrintUtil.kt * fix: add the header comment for linkedlist_stack class. * fix(kotlin): fix the kotlin file name. * delete blank line in main function * add comment for class head. * delete the old file. * fix the created time * delete blank line beneath files. --------- Co-authored-by: Yudong Jin <[email protected]>
1 parent 5ec5ef9 commit 42f4840

21 files changed

+20
-19
lines changed

codes/kotlin/chapter_array_and_linkedlist/linked_list.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,4 @@ fun main() {
7777
/* 查找节点 */
7878
val index: Int = find(n0, 2)
7979
println("链表中值为 2 的节点的索引 = $index")
80-
}
80+
}

codes/kotlin/chapter_divide_and_conquer/hanota.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* File: hanota.kt
3-
* Created Time: 2024-1-25
3+
* Created Time: 2024-01-25
44
* Author: curtishd ([email protected])
55
*/
66

codes/kotlin/chapter_hashing/array_hash_map.kt

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ class Pair(
1616
class ArrayHashMap {
1717
private val buckets = arrayOfNulls<Pair>(100)
1818

19-
/* 构造方法 */
2019
init {
2120
// 初始化数组,包含 100 个桶
2221
for (i in 0..<100) {

codes/kotlin/chapter_searching/binary_search.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* File: binary_search.kt
3-
* Created Time: 2024-1-25
3+
* Created Time: 2024-01-25
44
* Author: curtishd ([email protected])
55
*/
66

codes/kotlin/chapter_searching/binary_search_edge.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* File: binary_search_edge.kt
3-
* Created Time: 2024-1-25
3+
* Created Time: 2024-01-25
44
* Author: curtishd ([email protected])
55
*/
66

codes/kotlin/chapter_searching/binary_search_insertion.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* File: binary_search_insertion.kt
3-
* Created Time: 2024-1-25
3+
* Created Time: 2024-01-25
44
* Author: curtishd ([email protected])
55
*/
66

codes/kotlin/chapter_searching/hashing_search.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* File: hashing_search.kt
3-
* Created Time: 2024-1-25
3+
* Created Time: 2024-01-25
44
* Author: curtishd ([email protected])
55
*/
66

codes/kotlin/chapter_searching/linear_search.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* File: linear_search.kt
3-
* Created Time: 2024-1-25
3+
* Created Time: 2024-01-25
44
* Author: curtishd ([email protected])
55
*/
66

codes/kotlin/chapter_searching/two_sum.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* File: two_sum.kt
3-
* Created Time: 2024-1-25
3+
* Created Time: 2024-01-25
44
* Author: curtishd ([email protected])
55
*/
66

codes/kotlin/chapter_sorting/bubble_sort.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* File: bubble_sort.kt
3-
* Created Time: 2024-1-25
3+
* Created Time: 2024-01-25
44
* Author: curtishd ([email protected])
55
*/
66

codes/kotlin/chapter_sorting/bucket_sort.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* File: bucket_sort.kt
3-
* Created Time: 2024-1-25
3+
* Created Time: 2024-01-25
44
* Author: curtishd ([email protected])
55
*/
66

codes/kotlin/chapter_sorting/counting_sort.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* File: counting_sort.kt
3-
* Created Time: 2024-1-25
3+
* Created Time: 2024-01-25
44
* Author: curtishd ([email protected])
55
*/
66

codes/kotlin/chapter_sorting/heap_sort.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* File: heap_sort.kt
3-
* Created Time: 2024-1-25
3+
* Created Time: 2024-01-25
44
* Author: curtishd ([email protected])
55
*/
66

codes/kotlin/chapter_sorting/insertion_sort.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* File: insertion_sort.kt
3-
* Created Time: 2024-1-25
3+
* Created Time: 2024-01-25
44
* Author: curtishd ([email protected])
55
*/
66

codes/kotlin/chapter_sorting/merge_sort.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* File: merge_sort.kt
3-
* Created Time: 2024-1-25
3+
* Created Time: 2024-01-25
44
* Author: curtishd ([email protected])
55
*/
66

codes/kotlin/chapter_sorting/quick_sort.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* File: quick_sort.kt
3-
* Created Time: 2024-1-25
3+
* Created Time: 2024-01-25
44
* Author: curtishd ([email protected])
55
*/
66

codes/kotlin/chapter_sorting/radix_sort.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* File: radix_sort.kt
3-
* Created Time: 2024-1-25
3+
* Created Time: 2024-01-25
44
* Author: curtishd ([email protected])
55
*/
66

codes/kotlin/chapter_sorting/selection_sort.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* File: selection_sort.kt
3-
* Created Time: 2024-1-25
3+
* Created Time: 2024-01-25
44
* Author: curtishd ([email protected])
55
*/
66

codes/kotlin/chapter_stack_and_queue/linkedlist_queue.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
package chapter_stack_and_queue
88

9+
/* 基于链表实现的队列 */
910
class LinkedListQueue(
1011
// 头节点 front ,尾节点 rear
1112
private var front: ListNode? = null,
@@ -94,4 +95,4 @@ fun main() {
9495
/* 判断队列是否为空 */
9596
val isEmpty = queue.isEmpty()
9697
println("队列是否为空 = $isEmpty")
97-
}
98+
}

codes/kotlin/chapter_stack_and_queue/linkedlist_stack.kt

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
package chapter_stack_and_queue
88

9+
/* 基于链表实现的栈 */
910
class LinkedListStack(
1011
private var stackPeek: ListNode? = null, // 将头节点作为栈顶
1112
private var stkSize: Int = 0 // 栈的长度

0 commit comments

Comments
 (0)