mirror of
https://github.com/krahets/hello-algo.git
synced 2025-11-02 12:58:42 +08:00
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:
@ -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")
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
|
||||
package chapter_stack_and_queue
|
||||
|
||||
/* 基于链表实现的栈 */
|
||||
class LinkedListStack(
|
||||
private var stackPeek: ListNode? = null, // 将头节点作为栈顶
|
||||
private var stkSize: Int = 0 // 栈的长度
|
||||
|
||||
Reference in New Issue
Block a user