Fix all the incorrect comment in kotin files (#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 <krahets@163.com>
This commit is contained in:
curtishd 2024-03-25 22:14:55 +08:00 committed by GitHub
parent 5ec5ef9af0
commit 42f48405ef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 20 additions and 19 deletions

View file

@ -77,4 +77,4 @@ fun main() {
/* 查找节点 */
val index: Int = find(n0, 2)
println("链表中值为 2 的节点的索引 = $index")
}
}

View file

@ -1,6 +1,6 @@
/**
* File: hanota.kt
* Created Time: 2024-1-25
* Created Time: 2024-01-25
* Author: curtishd (1023632660@qq.com)
*/

View file

@ -16,7 +16,6 @@ class Pair(
class ArrayHashMap {
private val buckets = arrayOfNulls<Pair>(100)
/* 构造方法 */
init {
// 初始化数组,包含 100 个桶
for (i in 0..<100) {

View file

@ -1,6 +1,6 @@
/**
* File: binary_search.kt
* Created Time: 2024-1-25
* Created Time: 2024-01-25
* Author: curtishd (1023632660@qq.com)
*/

View file

@ -1,6 +1,6 @@
/**
* File: binary_search_edge.kt
* Created Time: 2024-1-25
* Created Time: 2024-01-25
* Author: curtishd (1023632660@qq.com)
*/

View file

@ -1,6 +1,6 @@
/**
* File: binary_search_insertion.kt
* Created Time: 2024-1-25
* Created Time: 2024-01-25
* Author: curtishd (1023632660@qq.com)
*/

View file

@ -1,6 +1,6 @@
/**
* File: hashing_search.kt
* Created Time: 2024-1-25
* Created Time: 2024-01-25
* Author: curtishd (1023632660@qq.com)
*/

View file

@ -1,6 +1,6 @@
/**
* File: linear_search.kt
* Created Time: 2024-1-25
* Created Time: 2024-01-25
* Author: curtishd (1023632660@qq.com)
*/

View file

@ -1,6 +1,6 @@
/**
* File: two_sum.kt
* Created Time: 2024-1-25
* Created Time: 2024-01-25
* Author: curtishd (1023632660@qq.com)
*/

View file

@ -1,6 +1,6 @@
/**
* File: bubble_sort.kt
* Created Time: 2024-1-25
* Created Time: 2024-01-25
* Author: curtishd (1023632660@qq.com)
*/

View file

@ -1,6 +1,6 @@
/**
* File: bucket_sort.kt
* Created Time: 2024-1-25
* Created Time: 2024-01-25
* Author: curtishd (1023632660@qq.com)
*/

View file

@ -1,6 +1,6 @@
/**
* File: counting_sort.kt
* Created Time: 2024-1-25
* Created Time: 2024-01-25
* Author: curtishd (1023632660@qq.com)
*/

View file

@ -1,6 +1,6 @@
/**
* File: heap_sort.kt
* Created Time: 2024-1-25
* Created Time: 2024-01-25
* Author: curtishd (1023632660@qq.com)
*/

View file

@ -1,6 +1,6 @@
/**
* File: insertion_sort.kt
* Created Time: 2024-1-25
* Created Time: 2024-01-25
* Author: curtishd (1023632660@qq.com)
*/

View file

@ -1,6 +1,6 @@
/**
* File: merge_sort.kt
* Created Time: 2024-1-25
* Created Time: 2024-01-25
* Author: curtishd (1023632660@qq.com)
*/

View file

@ -1,6 +1,6 @@
/**
* File: quick_sort.kt
* Created Time: 2024-1-25
* Created Time: 2024-01-25
* Author: curtishd (1023632660@qq.com)
*/

View file

@ -1,6 +1,6 @@
/**
* File: radix_sort.kt
* Created Time: 2024-1-25
* Created Time: 2024-01-25
* Author: curtishd (1023632660@qq.com)
*/

View file

@ -1,6 +1,6 @@
/**
* File: selection_sort.kt
* Created Time: 2024-1-25
* Created Time: 2024-01-25
* Author: curtishd (1023632660@qq.com)
*/

View file

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

View file

@ -6,6 +6,7 @@
package chapter_stack_and_queue
/* 基于链表实现的栈 */
class LinkedListStack(
private var stackPeek: ListNode? = null, // 将头节点作为栈顶
private var stkSize: Int = 0 // 栈的长度