package solved.p1679

class Solution {
    class SortingApproach {
        fun maxOperations(nums: IntArray, k: Int): Int {
            val sorted = nums.sorted()

            var operations = 0

            var head = 0
            var tail = nums.lastIndex
            while (head < tail) {
                while (tail > head) {
                    val headValue = sorted[head]
                    val tailValue = sorted[tail]
                    val kSum = headValue + tailValue
                    if (kSum > k) { // if sum is greater than k then we need a lower number thus we need to move tail to the left
                        tail--
                    } else if (kSum < k) { // if sum is lower than k then we need a greater number thus we need to move tail to the right
                        head++
                    } else { // we found 2 numbers that sum up to k this move both head and tail pointers
                        operations++
                        head++
                        tail--
                    }
                }
            }

            return operations
        }
    }

    class HashMapApproach {
        fun maxOperations(nums: IntArray, k: Int): Int {
            val frequencies = hashMapOf<Int, Int>()
            var operations = 0

            for (first in nums) {
                val second = k - first
                val secondFrequency = frequencies.getOrDefault(second, 0) // get second number frequency
                if (secondFrequency > 0) {
                    // if number has been already met (frequency > 0) then decrement frequency and increment result
                    // since we found a pair that sum up to k
                    frequencies[second] = secondFrequency - 1
                    operations++
                } else {
                    // if we have not met number yet, than increment numbers frequency
                    val firstFrequency = frequencies.getOrDefault(first, 0)
                    frequencies[first] = firstFrequency + 1
                }
            }

            return operations
        }
    }
}

Compiled from "Solution.kt"
public final class solved.p1679.Solution {
  public solved.p1679.Solution();
    Code:
       0: aload_0
       1: invokespecial #8                  // Method java/lang/Object."<init>":()V
       4: return
}

Compiled from "Solution.kt"
public final class solved.p1679.Solution$SortingApproach {
  public solved.p1679.Solution$SortingApproach();
    Code:
       0: aload_0
       1: invokespecial #8                  // Method java/lang/Object."<init>":()V
       4: return

  public final int maxOperations(int[], int);
    Code:
       0: aload_1
       1: ldc           #15                 // String nums
       3: invokestatic  #21                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: invokestatic  #27                 // Method kotlin/collections/ArraysKt.sorted:([I)Ljava/util/List;
      10: astore_3
      11: iconst_0
      12: istore        4
      14: iconst_0
      15: istore        5
      17: aload_1
      18: invokestatic  #31                 // Method kotlin/collections/ArraysKt.getLastIndex:([I)I
      21: istore        6
      23: iload         5
      25: iload         6
      27: if_icmpge     112
      30: iload         6
      32: iload         5
      34: if_icmple     23
      37: aload_3
      38: iload         5
      40: invokeinterface #37,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      45: checkcast     #39                 // class java/lang/Number
      48: invokevirtual #43                 // Method java/lang/Number.intValue:()I
      51: istore        7
      53: aload_3
      54: iload         6
      56: invokeinterface #37,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      61: checkcast     #39                 // class java/lang/Number
      64: invokevirtual #43                 // Method java/lang/Number.intValue:()I
      67: istore        8
      69: iload         7
      71: iload         8
      73: iadd
      74: istore        9
      76: iload         9
      78: iload_2
      79: if_icmple     88
      82: iinc          6, -1
      85: goto          30
      88: iload         9
      90: iload_2
      91: if_icmpge     100
      94: iinc          5, 1
      97: goto          30
     100: iinc          4, 1
     103: iinc          5, 1
     106: iinc          6, -1
     109: goto          30
     112: iload         4
     114: ireturn
}

Compiled from "Solution.kt"
public final class solved.p1679.Solution$HashMapApproach {
  public solved.p1679.Solution$HashMapApproach();
    Code:
       0: aload_0
       1: invokespecial #8                  // Method java/lang/Object."<init>":()V
       4: return

  public final int maxOperations(int[], int);
    Code:
       0: aload_1
       1: ldc           #15                 // String nums
       3: invokestatic  #21                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: new           #23                 // class java/util/HashMap
       9: dup
      10: invokespecial #24                 // Method java/util/HashMap."<init>":()V
      13: astore_3
      14: iconst_0
      15: istore        4
      17: iconst_0
      18: istore        5
      20: aload_1
      21: arraylength
      22: istore        6
      24: iload         5
      26: iload         6
      28: if_icmpge     169
      31: aload_1
      32: iload         5
      34: iaload
      35: istore        7
      37: iload_2
      38: iload         7
      40: isub
      41: istore        8
      43: aload_3
      44: iload         8
      46: invokestatic  #30                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      49: iconst_0
      50: invokestatic  #30                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      53: invokevirtual #34                 // Method java/util/HashMap.getOrDefault:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
      56: dup
      57: ldc           #36                 // String getOrDefault(...)
      59: invokestatic  #39                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
      62: checkcast     #41                 // class java/lang/Number
      65: invokevirtual #45                 // Method java/lang/Number.intValue:()I
      68: istore        9
      70: iload         9
      72: ifle          110
      75: iload         8
      77: invokestatic  #30                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      80: astore        11
      82: aload_3
      83: checkcast     #47                 // class java/util/Map
      86: aload         11
      88: iload         9
      90: iconst_1
      91: isub
      92: invokestatic  #30                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      95: invokeinterface #50,  3           // InterfaceMethod java/util/Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
     100: pop
     101: iload         4
     103: iinc          4, 1
     106: pop
     107: goto          163
     110: aload_3
     111: iload         7
     113: invokestatic  #30                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     116: iconst_0
     117: invokestatic  #30                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     120: invokevirtual #34                 // Method java/util/HashMap.getOrDefault:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
     123: dup
     124: ldc           #36                 // String getOrDefault(...)
     126: invokestatic  #39                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
     129: checkcast     #41                 // class java/lang/Number
     132: invokevirtual #45                 // Method java/lang/Number.intValue:()I
     135: istore        10
     137: iload         7
     139: invokestatic  #30                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     142: astore        12
     144: aload_3
     145: checkcast     #47                 // class java/util/Map
     148: aload         12
     150: iload         10
     152: iconst_1
     153: iadd
     154: invokestatic  #30                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     157: invokeinterface #50,  3           // InterfaceMethod java/util/Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
     162: pop
     163: iinc          5, 1
     166: goto          24
     169: iload         4
     171: ireturn
}


package solved.p581

class Solution {
    class SortingApproach {
        // The idea is to sort initial array and compare both arrays from the start and from the end.
        // The index of first element from the:
        // - start that is not equal is the lower bound of the subsequence
        // - end that if not equal is the upper bound of the subsequence
        fun findUnsortedSubarray(nums: IntArray): Int {
            val sorted = nums.sorted()

            var lowerBound = -1
            for (i in 0..nums.lastIndex) {
                if (nums[i] != sorted[i]) {
                    lowerBound = i
                    break
                }
            }

            var upperBound = -1
            for (i in nums.lastIndex downTo 0) {
                if (nums[i] != sorted[i]) {
                    upperBound = i
                    break
                }
            }

            return if (lowerBound == upperBound) 0 else upperBound - lowerBound + 1
        }
    }

    class TwoPointerApproach {
        // The idea is to find:
        // - the element that should be going next to the sorted part at the start of array
        // - the element that should be going right before the sorted part at the end of array
        // Lets describe the algorithm for the first part.
        // 1. It is easy if min element is somewhere in the middle, we just need to sort from the very beginning.
        // 2. In case the second minimal element is somewhere in the middle and lower elements are sorted in the beginning of array, then we need to sort from the second element.
        // ...
        // n. In case the nth minimal element is somewhere in the middle and lower elements are sorted in the beginning of array, then we need to sort from the nth element.
        //
        // So to find this element and its index we need to go through the array and if current element is lower than maximal element met, then this can be the upper bound of the subarray we need to sort if nothing similar will be met further.
        // For the lower bound - if current element is greater than minimal element met, then this can be the lower bound if nothing similar will be met further.
        fun findUnsortedSubarray(nums: IntArray): Int {
            var lowerBound = -1
            var upperBound = -1

            var min = Int.MAX_VALUE
            var max = Int.MIN_VALUE
            for (i in 0..nums.lastIndex) {

                val headPointer = i
                val headValue = nums[headPointer]

                if (headValue > max) {
                    max = headValue
                } else if (headValue < max) {
                    upperBound = headPointer
                }

                val tailPointer = nums.lastIndex - i
                val tailValue = nums[tailPointer]

                if (tailValue < min) {
                    min = tailValue
                } else if (tailValue > min) {
                    lowerBound = tailPointer
                }

            }

            return if (upperBound == lowerBound) 0 else upperBound - lowerBound + 1
        }
    }
}

Compiled from "Solution.kt"
public final class solved.p581.Solution {
  public solved.p581.Solution();
    Code:
       0: aload_0
       1: invokespecial #8                  // Method java/lang/Object."<init>":()V
       4: return
}

Compiled from "Solution.kt"
public final class solved.p581.Solution$SortingApproach {
  public solved.p581.Solution$SortingApproach();
    Code:
       0: aload_0
       1: invokespecial #8                  // Method java/lang/Object."<init>":()V
       4: return

  public final int findUnsortedSubarray(int[]);
    Code:
       0: aload_1
       1: ldc           #15                 // String nums
       3: invokestatic  #21                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: invokestatic  #27                 // Method kotlin/collections/ArraysKt.sorted:([I)Ljava/util/List;
      10: astore_2
      11: iconst_m1
      12: istore_3
      13: iconst_0
      14: istore        4
      16: aload_1
      17: invokestatic  #30                 // Method kotlin/collections/ArraysKt.getLastIndex:([I)I
      20: istore        5
      22: iload         4
      24: iload         5
      26: if_icmpgt     69
      29: aload_1
      30: iload         4
      32: iaload
      33: aload_2
      34: iload         4
      36: invokeinterface #36,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      41: checkcast     #38                 // class java/lang/Number
      44: invokevirtual #42                 // Method java/lang/Number.intValue:()I
      47: if_icmpeq     56
      50: iload         4
      52: istore_3
      53: goto          69
      56: iload         4
      58: iload         5
      60: if_icmpeq     69
      63: iinc          4, 1
      66: goto          29
      69: iconst_m1
      70: istore        4
      72: aload_1
      73: invokestatic  #30                 // Method kotlin/collections/ArraysKt.getLastIndex:([I)I
      76: istore        5
      78: iconst_m1
      79: iload         5
      81: if_icmpge     118
      84: aload_1
      85: iload         5
      87: iaload
      88: aload_2
      89: iload         5
      91: invokeinterface #36,  2           // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
      96: checkcast     #38                 // class java/lang/Number
      99: invokevirtual #42                 // Method java/lang/Number.intValue:()I
     102: if_icmpeq     112
     105: iload         5
     107: istore        4
     109: goto          118
     112: iinc          5, -1
     115: goto          78
     118: iload_3
     119: iload         4
     121: if_icmpne     128
     124: iconst_0
     125: goto          134
     128: iload         4
     130: iload_3
     131: isub
     132: iconst_1
     133: iadd
     134: ireturn
}

Compiled from "Solution.kt"
public final class solved.p581.Solution$TwoPointerApproach {
  public solved.p581.Solution$TwoPointerApproach();
    Code:
       0: aload_0
       1: invokespecial #8                  // Method java/lang/Object."<init>":()V
       4: return

  public final int findUnsortedSubarray(int[]);
    Code:
       0: aload_1
       1: ldc           #15                 // String nums
       3: invokestatic  #21                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: iconst_m1
       7: istore_2
       8: iconst_m1
       9: istore_3
      10: ldc           #22                 // int 2147483647
      12: istore        4
      14: ldc           #23                 // int -2147483648
      16: istore        5
      18: iconst_0
      19: istore        6
      21: aload_1
      22: invokestatic  #28                 // Method kotlin/collections/ArraysKt.getLastIndex:([I)I
      25: istore        7
      27: iload         6
      29: iload         7
      31: if_icmpgt     120
      34: iload         6
      36: istore        8
      38: aload_1
      39: iload         8
      41: iaload
      42: istore        9
      44: iload         9
      46: iload         5
      48: if_icmple     58
      51: iload         9
      53: istore        5
      55: goto          68
      58: iload         9
      60: iload         5
      62: if_icmpge     68
      65: iload         8
      67: istore_3
      68: aload_1
      69: invokestatic  #28                 // Method kotlin/collections/ArraysKt.getLastIndex:([I)I
      72: iload         6
      74: isub
      75: istore        10
      77: aload_1
      78: iload         10
      80: iaload
      81: istore        11
      83: iload         11
      85: iload         4
      87: if_icmpge     97
      90: iload         11
      92: istore        4
      94: goto          107
      97: iload         11
      99: iload         4
     101: if_icmple     107
     104: iload         10
     106: istore_2
     107: iload         6
     109: iload         7
     111: if_icmpeq     120
     114: iinc          6, 1
     117: goto          34
     120: iload_3
     121: iload_2
     122: if_icmpne     129
     125: iconst_0
     126: goto          134
     129: iload_3
     130: iload_2
     131: isub
     132: iconst_1
     133: iadd
     134: ireturn
}


package day3
import java.io.File
import java.util.PriorityQueue

val nums = Array<String>(10){ it.toString() }.toSet()

fun exercise1 ()
{
    val filename = "./inputs/day3ex1.txt"
    var total: Int = 0
    val allLines = File(filename).readLines().toList()

    for ((row, line) in allLines.withIndex())
    {
        var cnum: String = ""
        var toAdd: Boolean = false

        for (col in 0..line.length - 1)
        {
            val x: String = line[col].toString()
            if (!nums.contains(x)) {
                if (toAdd)
                    total += cnum.toInt()
                cnum = ""
                toAdd = false
                continue
            }

            cnum = cnum.plus(line[col])

            extloop@ for (i in row-1..row+1)
            {
                if (i < 0 || i >= allLines.size) continue
                for (j in col-1..col+1)
                {
                    if (j < 0 || j >= line.length) continue
                    val str = allLines[i][j].toString()
                    if (str != "." && !nums.contains(str)) {
                        toAdd = true
                        break@extloop
                    }
                }
            }
        } // end line
        if (toAdd) {
            total += cnum.toInt()
        }
    }
    println("Total: ${total}")
}

data class Symbol(val name: String, val row: Int, val col: Int)

fun exercise2 ()
{
    val filename = "./inputs/day3ex2.txt"
    var total: Int = 0
    val allLines = File(filename).readLines().toList()
    for ((row, line) in allLines.withIndex())
    {
        for (col in 0..line.length - 1)
        {
            if (line[col].toString() != "*") continue
            var neighbourNums = ArrayList<Int>()
            // Read the neighbourhood
            var explored = HashSet<Symbol>()
            var neighbours = ArrayList<Symbol>()
            for (i in row - 1..row + 1)
                for (j in col - 1..col + 1)
                    if (nums.contains(allLines[i][j].toString())) {
                        neighbours.add(Symbol(name = allLines[i][j].toString(), row = i, col = j))
                    }

            if (neighbours.size == 0) continue

            for (neighbour in neighbours)
            {
                if (explored.contains(neighbour)) continue
                var cnum: String = neighbour.name
                // Left numbers
                var pointer: Symbol = neighbour
                while (nums.contains(pointer.name) && pointer.col > 0)
                {
                    pointer = Symbol(
                        name=allLines[pointer.row][pointer.col - 1].toString(),
                        row=pointer.row,
                        col=pointer.col - 1
                    )
                    if (nums.contains(pointer.name)) {
                        cnum = pointer.name.plus(cnum)
                        explored.add(pointer)
                    }
                }

                // RIGHT numbers
                pointer = neighbour
                while (nums.contains(pointer.name) && pointer.col < line.length - 1)
                {
                    pointer = Symbol(
                        name=allLines[pointer.row][pointer.col + 1].toString(),
                        row=pointer.row,
                        col=pointer.col + 1
                    )
                    if (nums.contains(pointer.name)) {
                        cnum = cnum.plus(pointer.name)
                        explored.add(pointer)
                    }
                }

                neighbourNums.add(cnum.toInt())

            }

            if (neighbourNums.size < 2) continue
            total += neighbourNums.reduce { acc, i ->  acc * i }

        }
    }

    println("Total: ${total}")
}

Compiled from "day3.kt"
public final class day3.Day3Kt {
  private static final java.util.Set<java.lang.String> nums;

  public static final java.util.Set<java.lang.String> getNums();
    Code:
       0: getstatic     #12                 // Field nums:Ljava/util/Set;
       3: areturn

  public static final void exercise1();
    Code:
       0: ldc           #16                 // String ./inputs/day3ex1.txt
       2: astore_0
       3: iconst_0
       4: istore_1
       5: new           #18                 // class java/io/File
       8: dup
       9: aload_0
      10: invokespecial #22                 // Method java/io/File."<init>":(Ljava/lang/String;)V
      13: aconst_null
      14: iconst_1
      15: aconst_null
      16: invokestatic  #28                 // Method kotlin/io/FilesKt.readLines$default:(Ljava/io/File;Ljava/nio/charset/Charset;ILjava/lang/Object;)Ljava/util/List;
      19: checkcast     #30                 // class java/lang/Iterable
      22: invokestatic  #36                 // Method kotlin/collections/CollectionsKt.toList:(Ljava/lang/Iterable;)Ljava/util/List;
      25: astore_2
      26: aload_2
      27: checkcast     #30                 // class java/lang/Iterable
      30: invokeinterface #40,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      35: astore_3
      36: iconst_0
      37: istore        4
      39: aload_3
      40: invokeinterface #46,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      45: ifeq          341
      48: iload         4
      50: istore        5
      52: iload         4
      54: iconst_1
      55: iadd
      56: istore        4
      58: aload_3
      59: invokeinterface #50,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      64: checkcast     #52                 // class java/lang/String
      67: astore        6
      69: ldc           #54                 // String
      71: astore        7
      73: iconst_0
      74: istore        8
      76: iconst_0
      77: istore        9
      79: aload         6
      81: invokevirtual #58                 // Method java/lang/String.length:()I
      84: istore        10
      86: iload         9
      88: iload         10
      90: if_icmpge     325
      93: aload         6
      95: iload         9
      97: invokevirtual #62                 // Method java/lang/String.charAt:(I)C
     100: invokestatic  #66                 // Method java/lang/String.valueOf:(C)Ljava/lang/String;
     103: astore        11
     105: getstatic     #12                 // Field nums:Ljava/util/Set;
     108: aload         11
     110: invokeinterface #72,  2           // InterfaceMethod java/util/Set.contains:(Ljava/lang/Object;)Z
     115: ifne          141
     118: iload         8
     120: ifeq          131
     123: iload_1
     124: aload         7
     126: invokestatic  #78                 // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
     129: iadd
     130: istore_1
     131: ldc           #54                 // String
     133: astore        7
     135: iconst_0
     136: istore        8
     138: goto          319
     141: new           #80                 // class java/lang/StringBuilder
     144: dup
     145: invokespecial #82                 // Method java/lang/StringBuilder."<init>":()V
     148: aload         7
     150: invokevirtual #86                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     153: aload         6
     155: iload         9
     157: invokevirtual #62                 // Method java/lang/String.charAt:(I)C
     160: invokevirtual #89                 // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
     163: invokevirtual #93                 // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     166: astore        7
     168: iload         5
     170: iconst_1
     171: isub
     172: istore        12
     174: iload         5
     176: iconst_1
     177: iadd
     178: istore        13
     180: iload         12
     182: iload         13
     184: if_icmpgt     319
     187: iload         12
     189: iflt          306
     192: iload         12
     194: aload_2
     195: invokeinterface #98,  1           // InterfaceMethod java/util/List.size:()I
     200: if_icmplt     206
     203: goto          306
     206: iload         9
     208: iconst_1
     209: isub
     210: istore        14
     212: iload         9
     214: iconst_1
     215: iadd
     216: istore        15
     218: iload         14
     220: iload         15
     222: if_icmpgt     306
     225: iload         14
     227: iflt          293
     230: iload         14
     232: aload         6
     234: invokevirtual #58                 // Method java/lang/String.length:()I
     237: if_icmplt     243
     240: goto          293
     243: aload_2
     244: iload         12
     246: invokeinterface #102,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     251: checkcast     #52                 // class java/lang/String
     254: iload         14
     256: invokevirtual #62                 // Method java/lang/String.charAt:(I)C
     259: invokestatic  #66                 // Method java/lang/String.valueOf:(C)Ljava/lang/String;
     262: astore        16
     264: aload         16
     266: ldc           #104                // String .
     268: invokestatic  #110                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     271: ifne          293
     274: getstatic     #12                 // Field nums:Ljava/util/Set;
     277: aload         16
     279: invokeinterface #72,  2           // InterfaceMethod java/util/Set.contains:(Ljava/lang/Object;)Z
     284: ifne          293
     287: iconst_1
     288: istore        8
     290: goto          319
     293: iload         14
     295: iload         15
     297: if_icmpeq     306
     300: iinc          14, 1
     303: goto          225
     306: iload         12
     308: iload         13
     310: if_icmpeq     319
     313: iinc          12, 1
     316: goto          187
     319: iinc          9, 1
     322: goto          86
     325: iload         8
     327: ifeq          39
     330: iload_1
     331: aload         7
     333: invokestatic  #78                 // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
     336: iadd
     337: istore_1
     338: goto          39
     341: new           #80                 // class java/lang/StringBuilder
     344: dup
     345: invokespecial #82                 // Method java/lang/StringBuilder."<init>":()V
     348: ldc           #112                // String Total:
     350: invokevirtual #86                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     353: iload_1
     354: invokevirtual #115                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
     357: invokevirtual #93                 // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     360: getstatic     #121                // Field java/lang/System.out:Ljava/io/PrintStream;
     363: swap
     364: invokevirtual #127                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     367: return

  public static final void exercise2();
    Code:
       0: ldc           #146                // String ./inputs/day3ex2.txt
       2: astore_0
       3: iconst_0
       4: istore_1
       5: new           #18                 // class java/io/File
       8: dup
       9: aload_0
      10: invokespecial #22                 // Method java/io/File."<init>":(Ljava/lang/String;)V
      13: aconst_null
      14: iconst_1
      15: aconst_null
      16: invokestatic  #28                 // Method kotlin/io/FilesKt.readLines$default:(Ljava/io/File;Ljava/nio/charset/Charset;ILjava/lang/Object;)Ljava/util/List;
      19: checkcast     #30                 // class java/lang/Iterable
      22: invokestatic  #36                 // Method kotlin/collections/CollectionsKt.toList:(Ljava/lang/Iterable;)Ljava/util/List;
      25: astore_2
      26: aload_2
      27: checkcast     #30                 // class java/lang/Iterable
      30: invokeinterface #40,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      35: astore_3
      36: iconst_0
      37: istore        4
      39: aload_3
      40: invokeinterface #46,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      45: ifeq          740
      48: iload         4
      50: istore        5
      52: iload         4
      54: iconst_1
      55: iadd
      56: istore        4
      58: aload_3
      59: invokeinterface #50,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      64: checkcast     #52                 // class java/lang/String
      67: astore        6
      69: iconst_0
      70: istore        7
      72: aload         6
      74: invokevirtual #58                 // Method java/lang/String.length:()I
      77: istore        8
      79: iload         7
      81: iload         8
      83: if_icmpge     39
      86: aload         6
      88: iload         7
      90: invokevirtual #62                 // Method java/lang/String.charAt:(I)C
      93: invokestatic  #66                 // Method java/lang/String.valueOf:(C)Ljava/lang/String;
      96: ldc           #148                // String *
      98: invokestatic  #110                // Method kotlin/jvm/internal/Intrinsics.areEqual:(Ljava/lang/Object;Ljava/lang/Object;)Z
     101: ifeq          734
     104: new           #150                // class java/util/ArrayList
     107: dup
     108: invokespecial #151                // Method java/util/ArrayList."<init>":()V
     111: astore        9
     113: new           #153                // class java/util/HashSet
     116: dup
     117: invokespecial #154                // Method java/util/HashSet."<init>":()V
     120: astore        10
     122: new           #150                // class java/util/ArrayList
     125: dup
     126: invokespecial #151                // Method java/util/ArrayList."<init>":()V
     129: astore        11
     131: iload         5
     133: iconst_1
     134: isub
     135: istore        12
     137: iload         5
     139: iconst_1
     140: iadd
     141: istore        13
     143: iload         12
     145: iload         13
     147: if_icmpgt     261
     150: iload         7
     152: iconst_1
     153: isub
     154: istore        14
     156: iload         7
     158: iconst_1
     159: iadd
     160: istore        15
     162: iload         14
     164: iload         15
     166: if_icmpgt     248
     169: getstatic     #12                 // Field nums:Ljava/util/Set;
     172: aload_2
     173: iload         12
     175: invokeinterface #102,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     180: checkcast     #52                 // class java/lang/String
     183: iload         14
     185: invokevirtual #62                 // Method java/lang/String.charAt:(I)C
     188: invokestatic  #66                 // Method java/lang/String.valueOf:(C)Ljava/lang/String;
     191: invokeinterface #72,  2           // InterfaceMethod java/util/Set.contains:(Ljava/lang/Object;)Z
     196: ifeq          235
     199: aload         11
     201: new           #156                // class day3/Symbol
     204: dup
     205: aload_2
     206: iload         12
     208: invokeinterface #102,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     213: checkcast     #52                 // class java/lang/String
     216: iload         14
     218: invokevirtual #62                 // Method java/lang/String.charAt:(I)C
     221: invokestatic  #66                 // Method java/lang/String.valueOf:(C)Ljava/lang/String;
     224: iload         12
     226: iload         14
     228: invokespecial #159                // Method day3/Symbol."<init>":(Ljava/lang/String;II)V
     231: invokevirtual #162                // Method java/util/ArrayList.add:(Ljava/lang/Object;)Z
     234: pop
     235: iload         14
     237: iload         15
     239: if_icmpeq     248
     242: iinc          14, 1
     245: goto          169
     248: iload         12
     250: iload         13
     252: if_icmpeq     261
     255: iinc          12, 1
     258: goto          150
     261: aload         11
     263: invokevirtual #163                // Method java/util/ArrayList.size:()I
     266: ifeq          734
     269: aload         11
     271: invokevirtual #164                // Method java/util/ArrayList.iterator:()Ljava/util/Iterator;
     274: dup
     275: ldc           #166                // String iterator(...)
     277: invokestatic  #170                // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
     280: astore        12
     282: aload         12
     284: invokeinterface #46,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     289: ifeq          607
     292: aload         12
     294: invokeinterface #50,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     299: dup
     300: ldc           #172                // String next(...)
     302: invokestatic  #170                // Method kotlin/jvm/internal/Intrinsics.checkNotNullExpressionValue:(Ljava/lang/Object;Ljava/lang/String;)V
     305: checkcast     #156                // class day3/Symbol
     308: astore        13
     310: aload         10
     312: aload         13
     314: invokevirtual #173                // Method java/util/HashSet.contains:(Ljava/lang/Object;)Z
     317: ifne          282
     320: aload         13
     322: invokevirtual #176                // Method day3/Symbol.getName:()Ljava/lang/String;
     325: astore        14
     327: aload         13
     329: astore        15
     331: getstatic     #12                 // Field nums:Ljava/util/Set;
     334: aload         15
     336: invokevirtual #176                // Method day3/Symbol.getName:()Ljava/lang/String;
     339: invokeinterface #72,  2           // InterfaceMethod java/util/Set.contains:(Ljava/lang/Object;)Z
     344: ifeq          455
     347: aload         15
     349: invokevirtual #179                // Method day3/Symbol.getCol:()I
     352: ifle          455
     355: new           #156                // class day3/Symbol
     358: dup
     359: aload_2
     360: aload         15
     362: invokevirtual #182                // Method day3/Symbol.getRow:()I
     365: invokeinterface #102,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     370: checkcast     #52                 // class java/lang/String
     373: aload         15
     375: invokevirtual #179                // Method day3/Symbol.getCol:()I
     378: iconst_1
     379: isub
     380: invokevirtual #62                 // Method java/lang/String.charAt:(I)C
     383: invokestatic  #66                 // Method java/lang/String.valueOf:(C)Ljava/lang/String;
     386: aload         15
     388: invokevirtual #182                // Method day3/Symbol.getRow:()I
     391: aload         15
     393: invokevirtual #179                // Method day3/Symbol.getCol:()I
     396: iconst_1
     397: isub
     398: invokespecial #159                // Method day3/Symbol."<init>":(Ljava/lang/String;II)V
     401: astore        15
     403: getstatic     #12                 // Field nums:Ljava/util/Set;
     406: aload         15
     408: invokevirtual #176                // Method day3/Symbol.getName:()Ljava/lang/String;
     411: invokeinterface #72,  2           // InterfaceMethod java/util/Set.contains:(Ljava/lang/Object;)Z
     416: ifeq          331
     419: new           #80                 // class java/lang/StringBuilder
     422: dup
     423: invokespecial #82                 // Method java/lang/StringBuilder."<init>":()V
     426: aload         15
     428: invokevirtual #176                // Method day3/Symbol.getName:()Ljava/lang/String;
     431: invokevirtual #86                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     434: aload         14
     436: invokevirtual #86                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     439: invokevirtual #93                 // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     442: astore        14
     444: aload         10
     446: aload         15
     448: invokevirtual #183                // Method java/util/HashSet.add:(Ljava/lang/Object;)Z
     451: pop
     452: goto          331
     455: aload         13
     457: astore        15
     459: getstatic     #12                 // Field nums:Ljava/util/Set;
     462: aload         15
     464: invokevirtual #176                // Method day3/Symbol.getName:()Ljava/lang/String;
     467: invokeinterface #72,  2           // InterfaceMethod java/util/Set.contains:(Ljava/lang/Object;)Z
     472: ifeq          590
     475: aload         15
     477: invokevirtual #179                // Method day3/Symbol.getCol:()I
     480: aload         6
     482: invokevirtual #58                 // Method java/lang/String.length:()I
     485: iconst_1
     486: isub
     487: if_icmpge     590
     490: new           #156                // class day3/Symbol
     493: dup
     494: aload_2
     495: aload         15
     497: invokevirtual #182                // Method day3/Symbol.getRow:()I
     500: invokeinterface #102,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     505: checkcast     #52                 // class java/lang/String
     508: aload         15
     510: invokevirtual #179                // Method day3/Symbol.getCol:()I
     513: iconst_1
     514: iadd
     515: invokevirtual #62                 // Method java/lang/String.charAt:(I)C
     518: invokestatic  #66                 // Method java/lang/String.valueOf:(C)Ljava/lang/String;
     521: aload         15
     523: invokevirtual #182                // Method day3/Symbol.getRow:()I
     526: aload         15
     528: invokevirtual #179                // Method day3/Symbol.getCol:()I
     531: iconst_1
     532: iadd
     533: invokespecial #159                // Method day3/Symbol."<init>":(Ljava/lang/String;II)V
     536: astore        15
     538: getstatic     #12                 // Field nums:Ljava/util/Set;
     541: aload         15
     543: invokevirtual #176                // Method day3/Symbol.getName:()Ljava/lang/String;
     546: invokeinterface #72,  2           // InterfaceMethod java/util/Set.contains:(Ljava/lang/Object;)Z
     551: ifeq          459
     554: new           #80                 // class java/lang/StringBuilder
     557: dup
     558: invokespecial #82                 // Method java/lang/StringBuilder."<init>":()V
     561: aload         14
     563: invokevirtual #86                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     566: aload         15
     568: invokevirtual #176                // Method day3/Symbol.getName:()Ljava/lang/String;
     571: invokevirtual #86                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     574: invokevirtual #93                 // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     577: astore        14
     579: aload         10
     581: aload         15
     583: invokevirtual #183                // Method java/util/HashSet.add:(Ljava/lang/Object;)Z
     586: pop
     587: goto          459
     590: aload         9
     592: aload         14
     594: invokestatic  #78                 // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
     597: invokestatic  #186                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     600: invokevirtual #162                // Method java/util/ArrayList.add:(Ljava/lang/Object;)Z
     603: pop
     604: goto          282
     607: aload         9
     609: invokevirtual #163                // Method java/util/ArrayList.size:()I
     612: iconst_2
     613: if_icmplt     734
     616: iload_1
     617: aload         9
     619: checkcast     #30                 // class java/lang/Iterable
     622: astore        12
     624: istore        19
     626: iconst_0
     627: istore        13
     629: aload         12
     631: invokeinterface #40,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     636: astore        14
     638: aload         14
     640: invokeinterface #46,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     645: ifne          658
     648: new           #188                // class java/lang/UnsupportedOperationException
     651: dup
     652: ldc           #190                // String Empty collection can\'t be reduced.
     654: invokespecial #191                // Method java/lang/UnsupportedOperationException."<init>":(Ljava/lang/String;)V
     657: athrow
     658: aload         14
     660: invokeinterface #50,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     665: astore        15
     667: aload         14
     669: invokeinterface #46,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     674: ifeq          718
     677: aload         15
     679: aload         14
     681: invokeinterface #50,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     686: checkcast     #193                // class java/lang/Number
     689: invokevirtual #196                // Method java/lang/Number.intValue:()I
     692: istore        16
     694: checkcast     #193                // class java/lang/Number
     697: invokevirtual #196                // Method java/lang/Number.intValue:()I
     700: istore        17
     702: iconst_0
     703: istore        18
     705: iload         17
     707: iload         16
     709: imul
     710: invokestatic  #186                // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     713: astore        15
     715: goto          667
     718: aload         15
     720: astore        20
     722: iload         19
     724: aload         20
     726: checkcast     #193                // class java/lang/Number
     729: invokevirtual #196                // Method java/lang/Number.intValue:()I
     732: iadd
     733: istore_1
     734: iinc          7, 1
     737: goto          79
     740: new           #80                 // class java/lang/StringBuilder
     743: dup
     744: invokespecial #82                 // Method java/lang/StringBuilder."<init>":()V
     747: ldc           #112                // String Total:
     749: invokevirtual #86                 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     752: iload_1
     753: invokevirtual #115                // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;
     756: invokevirtual #93                 // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     759: getstatic     #121                // Field java/lang/System.out:Ljava/io/PrintStream;
     762: swap
     763: invokevirtual #127                // Method java/io/PrintStream.println:(Ljava/lang/Object;)V
     766: return

  static {};
    Code:
       0: iconst_0
       1: istore_0
       2: bipush        10
       4: anewarray     #52                 // class java/lang/String
       7: astore_1
       8: iload_0
       9: bipush        10
      11: if_icmpge     29
      14: iload_0
      15: istore_2
      16: aload_1
      17: iload_2
      18: iload_2
      19: invokestatic  #217                // Method java/lang/String.valueOf:(I)Ljava/lang/String;
      22: aastore
      23: iinc          0, 1
      26: goto          8
      29: aload_1
      30: invokestatic  #223                // Method kotlin/collections/ArraysKt.toSet:([Ljava/lang/Object;)Ljava/util/Set;
      33: putstatic     #12                 // Field nums:Ljava/util/Set;
      36: return
}


package io.github.sdkei.kotlin_jvm_utils

/**
 * Returns permutation of elements of the receiver.
 *
 * ```
 * listOf("A", "B", "C").permutation(2) // -> [[A, B], [A, C], [B, A], [B, C], [C, A], [C, B]]
 * ```
 *
 * @param count number of elements of permutation.
 */
fun <T> Iterable<T>.permutation(count: Int): List<List<T>> {
    require(count >= 0)

    val inputList = if (this is List<T>) this else toList()
    require(count <= inputList.size)

    return inputList.subPermutation(count)
}

private fun <T> List<T>.subPermutation(count: Int): List<List<T>> {
    if (count == 1) return map { listOf(it) }

    return (0 until size).flatMap { index ->
        val first = listOf(this[index])
        (subList(0, index) + subList(index + 1, size))
                .subPermutation(count - 1)
                .map { first + it }
    }
}

/**
 * Returns combination of elements of the receiver.
 *
 * ```
 * listOf("A", "B", "C", "D").combination(3) // -> [[A, B, C], [A, B, D], [A, C, D], [B, C, D]]
 * ```
 *
 * @param count number of elements of combination.
 */
fun <T> Iterable<T>.combination(count: Int): List<List<T>> {
    require(count >= 0)

    val inputList = if (this is List<T>) this else toList()
    require(count <= inputList.size)

    return inputList.subCombination(count)
}

private fun <T> List<T>.subCombination(count: Int): List<List<T>> {
    if (count == 1) return map { listOf(it) }

    return (0 until size - (count - 1)).flatMap { index ->
        val first = listOf(this[index])
        subList(index + 1, size)
                .subCombination(count - 1)
                .map { first + it }
    }
}

Compiled from "PermutationAndCombination.kt"
public final class io.github.sdkei.kotlin_jvm_utils.PermutationAndCombinationKt {
  public static final <T> java.util.List<java.util.List<T>> permutation(java.lang.Iterable<? extends T>, int);
    Code:
       0: aload_0
       1: ldc           #10                 // String <this>
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: iload_1
       7: iflt          14
      10: iconst_1
      11: goto          15
      14: iconst_0
      15: ifne          33
      18: ldc           #18                 // String Failed requirement.
      20: astore_3
      21: new           #20                 // class java/lang/IllegalArgumentException
      24: dup
      25: aload_3
      26: invokevirtual #24                 // Method java/lang/Object.toString:()Ljava/lang/String;
      29: invokespecial #28                 // Method java/lang/IllegalArgumentException."<init>":(Ljava/lang/String;)V
      32: athrow
      33: aload_0
      34: instanceof    #30                 // class java/util/List
      37: ifeq          47
      40: aload_0
      41: checkcast     #30                 // class java/util/List
      44: goto          51
      47: aload_0
      48: invokestatic  #36                 // Method kotlin/collections/CollectionsKt.toList:(Ljava/lang/Iterable;)Ljava/util/List;
      51: astore_2
      52: iload_1
      53: aload_2
      54: invokeinterface #40,  1           // InterfaceMethod java/util/List.size:()I
      59: if_icmpgt     66
      62: iconst_1
      63: goto          67
      66: iconst_0
      67: ifne          87
      70: ldc           #18                 // String Failed requirement.
      72: astore        4
      74: new           #20                 // class java/lang/IllegalArgumentException
      77: dup
      78: aload         4
      80: invokevirtual #24                 // Method java/lang/Object.toString:()Ljava/lang/String;
      83: invokespecial #28                 // Method java/lang/IllegalArgumentException."<init>":(Ljava/lang/String;)V
      86: athrow
      87: aload_2
      88: iload_1
      89: invokestatic  #44                 // Method subPermutation:(Ljava/util/List;I)Ljava/util/List;
      92: areturn

  private static final <T> java.util.List<java.util.List<T>> subPermutation(java.util.List<? extends T>, int);
    Code:
       0: iload_1
       1: iconst_1
       2: if_icmpne     99
       5: aload_0
       6: checkcast     #53                 // class java/lang/Iterable
       9: astore_2
      10: iconst_0
      11: istore_3
      12: aload_2
      13: astore        4
      15: new           #55                 // class java/util/ArrayList
      18: dup
      19: aload_2
      20: bipush        10
      22: invokestatic  #59                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      25: invokespecial #62                 // Method java/util/ArrayList."<init>":(I)V
      28: checkcast     #64                 // class java/util/Collection
      31: astore        5
      33: iconst_0
      34: istore        6
      36: aload         4
      38: invokeinterface #68,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      43: astore        7
      45: aload         7
      47: invokeinterface #74,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      52: ifeq          92
      55: aload         7
      57: invokeinterface #78,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      62: astore        8
      64: aload         5
      66: aload         8
      68: astore        9
      70: astore        22
      72: iconst_0
      73: istore        10
      75: aload         9
      77: invokestatic  #82                 // Method kotlin/collections/CollectionsKt.listOf:(Ljava/lang/Object;)Ljava/util/List;
      80: aload         22
      82: swap
      83: invokeinterface #86,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
      88: pop
      89: goto          45
      92: aload         5
      94: checkcast     #30                 // class java/util/List
      97: nop
      98: areturn
      99: iconst_0
     100: aload_0
     101: invokeinterface #40,  1           // InterfaceMethod java/util/List.size:()I
     106: invokestatic  #92                 // Method kotlin/ranges/RangesKt.until:(II)Lkotlin/ranges/IntRange;
     109: checkcast     #53                 // class java/lang/Iterable
     112: astore_2
     113: iconst_0
     114: istore_3
     115: aload_2
     116: astore        4
     118: new           #55                 // class java/util/ArrayList
     121: dup
     122: invokespecial #95                 // Method java/util/ArrayList."<init>":()V
     125: checkcast     #64                 // class java/util/Collection
     128: astore        5
     130: iconst_0
     131: istore        6
     133: aload         4
     135: invokeinterface #68,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     140: astore        7
     142: aload         7
     144: invokeinterface #74,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     149: ifeq          347
     152: aload         7
     154: checkcast     #97                 // class kotlin/collections/IntIterator
     157: invokevirtual #100                // Method kotlin/collections/IntIterator.nextInt:()I
     160: istore        8
     162: iload         8
     164: istore        9
     166: iconst_0
     167: istore        10
     169: aload_0
     170: iload         9
     172: invokeinterface #104,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     177: invokestatic  #82                 // Method kotlin/collections/CollectionsKt.listOf:(Ljava/lang/Object;)Ljava/util/List;
     180: astore        11
     182: aload_0
     183: iconst_0
     184: iload         9
     186: invokeinterface #108,  3          // InterfaceMethod java/util/List.subList:(II)Ljava/util/List;
     191: checkcast     #64                 // class java/util/Collection
     194: aload_0
     195: iload         9
     197: iconst_1
     198: iadd
     199: aload_0
     200: invokeinterface #40,  1           // InterfaceMethod java/util/List.size:()I
     205: invokeinterface #108,  3          // InterfaceMethod java/util/List.subList:(II)Ljava/util/List;
     210: checkcast     #53                 // class java/lang/Iterable
     213: invokestatic  #112                // Method kotlin/collections/CollectionsKt.plus:(Ljava/util/Collection;Ljava/lang/Iterable;)Ljava/util/List;
     216: iload_1
     217: iconst_1
     218: isub
     219: invokestatic  #44                 // Method subPermutation:(Ljava/util/List;I)Ljava/util/List;
     222: checkcast     #53                 // class java/lang/Iterable
     225: astore        12
     227: nop
     228: iconst_0
     229: istore        13
     231: aload         12
     233: astore        14
     235: new           #55                 // class java/util/ArrayList
     238: dup
     239: aload         12
     241: bipush        10
     243: invokestatic  #59                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     246: invokespecial #62                 // Method java/util/ArrayList."<init>":(I)V
     249: checkcast     #64                 // class java/util/Collection
     252: astore        15
     254: iconst_0
     255: istore        16
     257: aload         14
     259: invokeinterface #68,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     264: astore        17
     266: aload         17
     268: invokeinterface #74,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     273: ifeq          324
     276: aload         17
     278: invokeinterface #78,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     283: astore        18
     285: aload         15
     287: aload         18
     289: checkcast     #30                 // class java/util/List
     292: astore        19
     294: astore        20
     296: iconst_0
     297: istore        21
     299: aload         11
     301: checkcast     #64                 // class java/util/Collection
     304: aload         19
     306: checkcast     #53                 // class java/lang/Iterable
     309: invokestatic  #112                // Method kotlin/collections/CollectionsKt.plus:(Ljava/util/Collection;Ljava/lang/Iterable;)Ljava/util/List;
     312: aload         20
     314: swap
     315: invokeinterface #86,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     320: pop
     321: goto          266
     324: aload         15
     326: checkcast     #30                 // class java/util/List
     329: nop
     330: checkcast     #53                 // class java/lang/Iterable
     333: nop
     334: astore        9
     336: aload         5
     338: aload         9
     340: invokestatic  #116                // Method kotlin/collections/CollectionsKt.addAll:(Ljava/util/Collection;Ljava/lang/Iterable;)Z
     343: pop
     344: goto          142
     347: aload         5
     349: checkcast     #30                 // class java/util/List
     352: nop
     353: areturn

  public static final <T> java.util.List<java.util.List<T>> combination(java.lang.Iterable<? extends T>, int);
    Code:
       0: aload_0
       1: ldc           #10                 // String <this>
       3: invokestatic  #16                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: iload_1
       7: iflt          14
      10: iconst_1
      11: goto          15
      14: iconst_0
      15: ifne          33
      18: ldc           #18                 // String Failed requirement.
      20: astore_3
      21: new           #20                 // class java/lang/IllegalArgumentException
      24: dup
      25: aload_3
      26: invokevirtual #24                 // Method java/lang/Object.toString:()Ljava/lang/String;
      29: invokespecial #28                 // Method java/lang/IllegalArgumentException."<init>":(Ljava/lang/String;)V
      32: athrow
      33: aload_0
      34: instanceof    #30                 // class java/util/List
      37: ifeq          47
      40: aload_0
      41: checkcast     #30                 // class java/util/List
      44: goto          51
      47: aload_0
      48: invokestatic  #36                 // Method kotlin/collections/CollectionsKt.toList:(Ljava/lang/Iterable;)Ljava/util/List;
      51: astore_2
      52: iload_1
      53: aload_2
      54: invokeinterface #40,  1           // InterfaceMethod java/util/List.size:()I
      59: if_icmpgt     66
      62: iconst_1
      63: goto          67
      66: iconst_0
      67: ifne          87
      70: ldc           #18                 // String Failed requirement.
      72: astore        4
      74: new           #20                 // class java/lang/IllegalArgumentException
      77: dup
      78: aload         4
      80: invokevirtual #24                 // Method java/lang/Object.toString:()Ljava/lang/String;
      83: invokespecial #28                 // Method java/lang/IllegalArgumentException."<init>":(Ljava/lang/String;)V
      86: athrow
      87: aload_2
      88: iload_1
      89: invokestatic  #141                // Method subCombination:(Ljava/util/List;I)Ljava/util/List;
      92: areturn

  private static final <T> java.util.List<java.util.List<T>> subCombination(java.util.List<? extends T>, int);
    Code:
       0: iload_1
       1: iconst_1
       2: if_icmpne     99
       5: aload_0
       6: checkcast     #53                 // class java/lang/Iterable
       9: astore_2
      10: iconst_0
      11: istore_3
      12: aload_2
      13: astore        4
      15: new           #55                 // class java/util/ArrayList
      18: dup
      19: aload_2
      20: bipush        10
      22: invokestatic  #59                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
      25: invokespecial #62                 // Method java/util/ArrayList."<init>":(I)V
      28: checkcast     #64                 // class java/util/Collection
      31: astore        5
      33: iconst_0
      34: istore        6
      36: aload         4
      38: invokeinterface #68,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
      43: astore        7
      45: aload         7
      47: invokeinterface #74,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      52: ifeq          92
      55: aload         7
      57: invokeinterface #78,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      62: astore        8
      64: aload         5
      66: aload         8
      68: astore        9
      70: astore        22
      72: iconst_0
      73: istore        10
      75: aload         9
      77: invokestatic  #82                 // Method kotlin/collections/CollectionsKt.listOf:(Ljava/lang/Object;)Ljava/util/List;
      80: aload         22
      82: swap
      83: invokeinterface #86,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
      88: pop
      89: goto          45
      92: aload         5
      94: checkcast     #30                 // class java/util/List
      97: nop
      98: areturn
      99: iconst_0
     100: aload_0
     101: invokeinterface #40,  1           // InterfaceMethod java/util/List.size:()I
     106: iload_1
     107: iconst_1
     108: isub
     109: isub
     110: invokestatic  #92                 // Method kotlin/ranges/RangesKt.until:(II)Lkotlin/ranges/IntRange;
     113: checkcast     #53                 // class java/lang/Iterable
     116: astore_2
     117: iconst_0
     118: istore_3
     119: aload_2
     120: astore        4
     122: new           #55                 // class java/util/ArrayList
     125: dup
     126: invokespecial #95                 // Method java/util/ArrayList."<init>":()V
     129: checkcast     #64                 // class java/util/Collection
     132: astore        5
     134: iconst_0
     135: istore        6
     137: aload         4
     139: invokeinterface #68,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     144: astore        7
     146: aload         7
     148: invokeinterface #74,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     153: ifeq          333
     156: aload         7
     158: checkcast     #97                 // class kotlin/collections/IntIterator
     161: invokevirtual #100                // Method kotlin/collections/IntIterator.nextInt:()I
     164: istore        8
     166: iload         8
     168: istore        9
     170: iconst_0
     171: istore        10
     173: aload_0
     174: iload         9
     176: invokeinterface #104,  2          // InterfaceMethod java/util/List.get:(I)Ljava/lang/Object;
     181: invokestatic  #82                 // Method kotlin/collections/CollectionsKt.listOf:(Ljava/lang/Object;)Ljava/util/List;
     184: astore        11
     186: aload_0
     187: iload         9
     189: iconst_1
     190: iadd
     191: aload_0
     192: invokeinterface #40,  1           // InterfaceMethod java/util/List.size:()I
     197: invokeinterface #108,  3          // InterfaceMethod java/util/List.subList:(II)Ljava/util/List;
     202: iload_1
     203: iconst_1
     204: isub
     205: invokestatic  #141                // Method subCombination:(Ljava/util/List;I)Ljava/util/List;
     208: checkcast     #53                 // class java/lang/Iterable
     211: astore        12
     213: nop
     214: iconst_0
     215: istore        13
     217: aload         12
     219: astore        14
     221: new           #55                 // class java/util/ArrayList
     224: dup
     225: aload         12
     227: bipush        10
     229: invokestatic  #59                 // Method kotlin/collections/CollectionsKt.collectionSizeOrDefault:(Ljava/lang/Iterable;I)I
     232: invokespecial #62                 // Method java/util/ArrayList."<init>":(I)V
     235: checkcast     #64                 // class java/util/Collection
     238: astore        15
     240: iconst_0
     241: istore        16
     243: aload         14
     245: invokeinterface #68,  1           // InterfaceMethod java/lang/Iterable.iterator:()Ljava/util/Iterator;
     250: astore        17
     252: aload         17
     254: invokeinterface #74,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
     259: ifeq          310
     262: aload         17
     264: invokeinterface #78,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
     269: astore        18
     271: aload         15
     273: aload         18
     275: checkcast     #30                 // class java/util/List
     278: astore        19
     280: astore        20
     282: iconst_0
     283: istore        21
     285: aload         11
     287: checkcast     #64                 // class java/util/Collection
     290: aload         19
     292: checkcast     #53                 // class java/lang/Iterable
     295: invokestatic  #112                // Method kotlin/collections/CollectionsKt.plus:(Ljava/util/Collection;Ljava/lang/Iterable;)Ljava/util/List;
     298: aload         20
     300: swap
     301: invokeinterface #86,  2           // InterfaceMethod java/util/Collection.add:(Ljava/lang/Object;)Z
     306: pop
     307: goto          252
     310: aload         15
     312: checkcast     #30                 // class java/util/List
     315: nop
     316: checkcast     #53                 // class java/lang/Iterable
     319: nop
     320: astore        9
     322: aload         5
     324: aload         9
     326: invokestatic  #116                // Method kotlin/collections/CollectionsKt.addAll:(Ljava/util/Collection;Ljava/lang/Iterable;)Z
     329: pop
     330: goto          146
     333: aload         5
     335: checkcast     #30                 // class java/util/List
     338: nop
     339: areturn
}


package dayFolders.day5

val digitToLetterMap = mapOf(
    2 to listOf('a', 'b', 'c'),
    3 to listOf('d', 'e', 'f'),
    4 to listOf('g', 'h', 'i'),
    5 to listOf('j', 'k', 'l'),
    6 to listOf('m', 'n', 'o'),
    7 to listOf('p', 'q', 'r', 's'),
    8 to listOf('t', 'u', 'v'),
    9 to listOf('w', 'x', 'y', 'z')
)

fun letterCombinations(digits: String): List<String> {
    val result = mutableListOf<String>()
    if (digits.isEmpty()) return result

    addAllPermutations(digits, "", 0, result)

    return result
}

fun addAllPermutations(digits: String, permutation: String, k: Int, result: MutableList<String>) {
    if (k == digits.length) {
        result.add(permutation)
        return
    }

    val characters = digitToLetterMap.getValue(digits[k].toString().toInt())

    for (element in characters) {
        addAllPermutations(digits, permutation + element, k + 1, result)
    }
}

Compiled from "letterCombinationsOfPhone.kt"
public final class dayFolders.day5.LetterCombinationsOfPhoneKt {
  private static final java.util.Map<java.lang.Integer, java.util.List<java.lang.Character>> digitToLetterMap;

  public static final java.util.Map<java.lang.Integer, java.util.List<java.lang.Character>> getDigitToLetterMap();
    Code:
       0: getstatic     #12                 // Field digitToLetterMap:Ljava/util/Map;
       3: areturn

  public static final java.util.List<java.lang.String> letterCombinations(java.lang.String);
    Code:
       0: aload_0
       1: ldc           #17                 // String digits
       3: invokestatic  #23                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: new           #25                 // class java/util/ArrayList
       9: dup
      10: invokespecial #29                 // Method java/util/ArrayList."<init>":()V
      13: checkcast     #31                 // class java/util/List
      16: astore_1
      17: aload_0
      18: checkcast     #33                 // class java/lang/CharSequence
      21: invokeinterface #37,  1           // InterfaceMethod java/lang/CharSequence.length:()I
      26: ifne          33
      29: iconst_1
      30: goto          34
      33: iconst_0
      34: ifeq          39
      37: aload_1
      38: areturn
      39: aload_0
      40: ldc           #39                 // String
      42: iconst_0
      43: aload_1
      44: invokestatic  #43                 // Method addAllPermutations:(Ljava/lang/String;Ljava/lang/String;ILjava/util/List;)V
      47: aload_1
      48: areturn

  public static final void addAllPermutations(java.lang.String, java.lang.String, int, java.util.List<java.lang.String>);
    Code:
       0: aload_0
       1: ldc           #17                 // String digits
       3: invokestatic  #23                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
       6: aload_1
       7: ldc           #49                 // String permutation
       9: invokestatic  #23                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      12: aload_3
      13: ldc           #50                 // String result
      15: invokestatic  #23                 // Method kotlin/jvm/internal/Intrinsics.checkNotNullParameter:(Ljava/lang/Object;Ljava/lang/String;)V
      18: iload_2
      19: aload_0
      20: invokevirtual #53                 // Method java/lang/String.length:()I
      23: if_icmpne     35
      26: aload_3
      27: aload_1
      28: invokeinterface #57,  2           // InterfaceMethod java/util/List.add:(Ljava/lang/Object;)Z
      33: pop
      34: return
      35: getstatic     #12                 // Field digitToLetterMap:Ljava/util/Map;
      38: aload_0
      39: iload_2
      40: invokevirtual #61                 // Method java/lang/String.charAt:(I)C
      43: invokestatic  #65                 // Method java/lang/String.valueOf:(C)Ljava/lang/String;
      46: invokestatic  #71                 // Method java/lang/Integer.parseInt:(Ljava/lang/String;)I
      49: invokestatic  #74                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      52: invokestatic  #80                 // Method kotlin/collections/MapsKt.getValue:(Ljava/util/Map;Ljava/lang/Object;)Ljava/lang/Object;
      55: checkcast     #31                 // class java/util/List
      58: astore        4
      60: aload         4
      62: invokeinterface #84,  1           // InterfaceMethod java/util/List.iterator:()Ljava/util/Iterator;
      67: astore        5
      69: aload         5
      71: invokeinterface #90,  1           // InterfaceMethod java/util/Iterator.hasNext:()Z
      76: ifeq          124
      79: aload         5
      81: invokeinterface #94,  1           // InterfaceMethod java/util/Iterator.next:()Ljava/lang/Object;
      86: checkcast     #96                 // class java/lang/Character
      89: invokevirtual #100                // Method java/lang/Character.charValue:()C
      92: istore        6
      94: aload_0
      95: new           #102                // class java/lang/StringBuilder
      98: dup
      99: invokespecial #103                // Method java/lang/StringBuilder."<init>":()V
     102: aload_1
     103: invokevirtual #107                // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
     106: iload         6
     108: invokevirtual #110                // Method java/lang/StringBuilder.append:(C)Ljava/lang/StringBuilder;
     111: invokevirtual #114                // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
     114: iload_2
     115: iconst_1
     116: iadd
     117: aload_3
     118: invokestatic  #43                 // Method addAllPermutations:(Ljava/lang/String;Ljava/lang/String;ILjava/util/List;)V
     121: goto          69
     124: return

  static {};
    Code:
       0: bipush        8
       2: anewarray     #122                // class kotlin/Pair
       5: astore_0
       6: aload_0
       7: iconst_0
       8: iconst_2
       9: invokestatic  #74                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      12: iconst_3
      13: anewarray     #96                 // class java/lang/Character
      16: astore_1
      17: aload_1
      18: iconst_0
      19: bipush        97
      21: invokestatic  #125                // Method java/lang/Character.valueOf:(C)Ljava/lang/Character;
      24: aastore
      25: aload_1
      26: iconst_1
      27: bipush        98
      29: invokestatic  #125                // Method java/lang/Character.valueOf:(C)Ljava/lang/Character;
      32: aastore
      33: aload_1
      34: iconst_2
      35: bipush        99
      37: invokestatic  #125                // Method java/lang/Character.valueOf:(C)Ljava/lang/Character;
      40: aastore
      41: aload_1
      42: invokestatic  #131                // Method kotlin/collections/CollectionsKt.listOf:([Ljava/lang/Object;)Ljava/util/List;
      45: invokestatic  #137                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
      48: aastore
      49: aload_0
      50: iconst_1
      51: iconst_3
      52: invokestatic  #74                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      55: iconst_3
      56: anewarray     #96                 // class java/lang/Character
      59: astore_1
      60: aload_1
      61: iconst_0
      62: bipush        100
      64: invokestatic  #125                // Method java/lang/Character.valueOf:(C)Ljava/lang/Character;
      67: aastore
      68: aload_1
      69: iconst_1
      70: bipush        101
      72: invokestatic  #125                // Method java/lang/Character.valueOf:(C)Ljava/lang/Character;
      75: aastore
      76: aload_1
      77: iconst_2
      78: bipush        102
      80: invokestatic  #125                // Method java/lang/Character.valueOf:(C)Ljava/lang/Character;
      83: aastore
      84: aload_1
      85: invokestatic  #131                // Method kotlin/collections/CollectionsKt.listOf:([Ljava/lang/Object;)Ljava/util/List;
      88: invokestatic  #137                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
      91: aastore
      92: aload_0
      93: iconst_2
      94: iconst_4
      95: invokestatic  #74                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
      98: iconst_3
      99: anewarray     #96                 // class java/lang/Character
     102: astore_1
     103: aload_1
     104: iconst_0
     105: bipush        103
     107: invokestatic  #125                // Method java/lang/Character.valueOf:(C)Ljava/lang/Character;
     110: aastore
     111: aload_1
     112: iconst_1
     113: bipush        104
     115: invokestatic  #125                // Method java/lang/Character.valueOf:(C)Ljava/lang/Character;
     118: aastore
     119: aload_1
     120: iconst_2
     121: bipush        105
     123: invokestatic  #125                // Method java/lang/Character.valueOf:(C)Ljava/lang/Character;
     126: aastore
     127: aload_1
     128: invokestatic  #131                // Method kotlin/collections/CollectionsKt.listOf:([Ljava/lang/Object;)Ljava/util/List;
     131: invokestatic  #137                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     134: aastore
     135: aload_0
     136: iconst_3
     137: iconst_5
     138: invokestatic  #74                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     141: iconst_3
     142: anewarray     #96                 // class java/lang/Character
     145: astore_1
     146: aload_1
     147: iconst_0
     148: bipush        106
     150: invokestatic  #125                // Method java/lang/Character.valueOf:(C)Ljava/lang/Character;
     153: aastore
     154: aload_1
     155: iconst_1
     156: bipush        107
     158: invokestatic  #125                // Method java/lang/Character.valueOf:(C)Ljava/lang/Character;
     161: aastore
     162: aload_1
     163: iconst_2
     164: bipush        108
     166: invokestatic  #125                // Method java/lang/Character.valueOf:(C)Ljava/lang/Character;
     169: aastore
     170: aload_1
     171: invokestatic  #131                // Method kotlin/collections/CollectionsKt.listOf:([Ljava/lang/Object;)Ljava/util/List;
     174: invokestatic  #137                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     177: aastore
     178: aload_0
     179: iconst_4
     180: bipush        6
     182: invokestatic  #74                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     185: iconst_3
     186: anewarray     #96                 // class java/lang/Character
     189: astore_1
     190: aload_1
     191: iconst_0
     192: bipush        109
     194: invokestatic  #125                // Method java/lang/Character.valueOf:(C)Ljava/lang/Character;
     197: aastore
     198: aload_1
     199: iconst_1
     200: bipush        110
     202: invokestatic  #125                // Method java/lang/Character.valueOf:(C)Ljava/lang/Character;
     205: aastore
     206: aload_1
     207: iconst_2
     208: bipush        111
     210: invokestatic  #125                // Method java/lang/Character.valueOf:(C)Ljava/lang/Character;
     213: aastore
     214: aload_1
     215: invokestatic  #131                // Method kotlin/collections/CollectionsKt.listOf:([Ljava/lang/Object;)Ljava/util/List;
     218: invokestatic  #137                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     221: aastore
     222: aload_0
     223: iconst_5
     224: bipush        7
     226: invokestatic  #74                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     229: iconst_4
     230: anewarray     #96                 // class java/lang/Character
     233: astore_1
     234: aload_1
     235: iconst_0
     236: bipush        112
     238: invokestatic  #125                // Method java/lang/Character.valueOf:(C)Ljava/lang/Character;
     241: aastore
     242: aload_1
     243: iconst_1
     244: bipush        113
     246: invokestatic  #125                // Method java/lang/Character.valueOf:(C)Ljava/lang/Character;
     249: aastore
     250: aload_1
     251: iconst_2
     252: bipush        114
     254: invokestatic  #125                // Method java/lang/Character.valueOf:(C)Ljava/lang/Character;
     257: aastore
     258: aload_1
     259: iconst_3
     260: bipush        115
     262: invokestatic  #125                // Method java/lang/Character.valueOf:(C)Ljava/lang/Character;
     265: aastore
     266: aload_1
     267: invokestatic  #131                // Method kotlin/collections/CollectionsKt.listOf:([Ljava/lang/Object;)Ljava/util/List;
     270: invokestatic  #137                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     273: aastore
     274: aload_0
     275: bipush        6
     277: bipush        8
     279: invokestatic  #74                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     282: iconst_3
     283: anewarray     #96                 // class java/lang/Character
     286: astore_1
     287: aload_1
     288: iconst_0
     289: bipush        116
     291: invokestatic  #125                // Method java/lang/Character.valueOf:(C)Ljava/lang/Character;
     294: aastore
     295: aload_1
     296: iconst_1
     297: bipush        117
     299: invokestatic  #125                // Method java/lang/Character.valueOf:(C)Ljava/lang/Character;
     302: aastore
     303: aload_1
     304: iconst_2
     305: bipush        118
     307: invokestatic  #125                // Method java/lang/Character.valueOf:(C)Ljava/lang/Character;
     310: aastore
     311: aload_1
     312: invokestatic  #131                // Method kotlin/collections/CollectionsKt.listOf:([Ljava/lang/Object;)Ljava/util/List;
     315: invokestatic  #137                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     318: aastore
     319: aload_0
     320: bipush        7
     322: bipush        9
     324: invokestatic  #74                 // Method java/lang/Integer.valueOf:(I)Ljava/lang/Integer;
     327: iconst_4
     328: anewarray     #96                 // class java/lang/Character
     331: astore_1
     332: aload_1
     333: iconst_0
     334: bipush        119
     336: invokestatic  #125                // Method java/lang/Character.valueOf:(C)Ljava/lang/Character;
     339: aastore
     340: aload_1
     341: iconst_1
     342: bipush        120
     344: invokestatic  #125                // Method java/lang/Character.valueOf:(C)Ljava/lang/Character;
     347: aastore
     348: aload_1
     349: iconst_2
     350: bipush        121
     352: invokestatic  #125                // Method java/lang/Character.valueOf:(C)Ljava/lang/Character;
     355: aastore
     356: aload_1
     357: iconst_3
     358: bipush        122
     360: invokestatic  #125                // Method java/lang/Character.valueOf:(C)Ljava/lang/Character;
     363: aastore
     364: aload_1
     365: invokestatic  #131                // Method kotlin/collections/CollectionsKt.listOf:([Ljava/lang/Object;)Ljava/util/List;
     368: invokestatic  #137                // Method kotlin/TuplesKt.to:(Ljava/lang/Object;Ljava/lang/Object;)Lkotlin/Pair;
     371: aastore
     372: aload_0
     373: invokestatic  #141                // Method kotlin/collections/MapsKt.mapOf:([Lkotlin/Pair;)Ljava/util/Map;
     376: putstatic     #12                 // Field digitToLetterMap:Ljava/util/Map;
     379: return
}