File tree Expand file tree Collapse file tree 3 files changed +19
-0
lines changed
src.save/main/kotlin/g0001_0100
s0023_merge_k_sorted_lists
s0025_reverse_nodes_in_k_group Expand file tree Collapse file tree 3 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,15 @@ package g0001_0100.s0023_merge_k_sorted_lists
55
66import com_github_leetcode.ListNode
77
8+ /*
9+ * Example:
10+ * var li = ListNode(5)
11+ * var v = li.`val`
12+ * Definition for singly-linked list.
13+ * class ListNode(var `val`: Int) {
14+ * var next: ListNode? = null
15+ * }
16+ */
817class Solution {
918 fun mergeKLists (lists : Array <ListNode >): ListNode ? {
1019 return if (lists.isEmpty()) {
Original file line number Diff line number Diff line change @@ -5,6 +5,15 @@ package g0001_0100.s0025_reverse_nodes_in_k_group
55
66import com_github_leetcode.ListNode
77
8+ /*
9+ * Example:
10+ * var li = ListNode(5)
11+ * var v = li.`val`
12+ * Definition for singly-linked list.
13+ * class ListNode(var `val`: Int) {
14+ * var next: ListNode? = null
15+ * }
16+ */
817class Solution {
918 fun reverseKGroup (head : ListNode ? , k : Int ): ListNode ? {
1019 if (head?.next == null || k == 1 ) {
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ package g0001_0100.s0047_permutations_ii
55
66class Solution {
77 private var ans: MutableList <List <Int >>? = null
8+
89 fun permuteUnique (nums : IntArray ): List <List <Int >> {
910 ans = ArrayList ()
1011 permute(nums, 0 )
You can’t perform that action at this time.
0 commit comments