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>
pull/1177/head
curtishd 8 months ago committed by GitHub
parent 5ec5ef9af0
commit 42f48405ef
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Loading…
Cancel
Save