# 06-04 ## 1 Example1: Input: nums = [5,7,7,8,8,10], target = 8 output = 3 Example2: Input: nums = [5,7,7,8,8,10], target = 7 output = 1 Example3: Input: nums = [5,7,7,8,8,10], target = 11 output = -1 ```kotlin fun find(nums: List<Int>, target: Int): Int { var targetIndex = -1 if () for (index in 0 until nums.size) { if (nums[index] == target) { targetIndex = index break } } return targetIndex } ``` ## 2 ```kotlin= var isComputed = false val isComputedStr = isComputed fun foo(computed: Boolean) { isComputed = computed System.out.println("isComputedStr " + isComputedStr) } fun main() { foo(true) } ``` false ## 3 Data Class hashcode equals ## 4 inline function - ## 5 Memory Leak ## 6 Sealed Class