- URL: https://completion.amazon.com/api/2017/
- Resource: suggestions
- Paramters:
- session-id: 133-2190809-5709766
- customer-id: A1CNYR04B8CZOZ
- request-id: NTH41W0H5GYC8N00NVCS
- page-type: Gateway
- lop=en_US
- site-variant=desktop
- client-info=amazon-search-ui
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // input..: [1,6,10] | |
| // target.: 16 | |
| // output.: [1,2] | |
| fun main() { | |
| val array = arrayOf(1, 6, 10) | |
| val target = 16 | |
| val result = twoInt(array, target) | |
| assert(result == Pair(1,2)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package org.example | |
| data class ListNode(var value: Int, var next: ListNode? = null) | |
| // [val, next] -> [val, next] -> null | |
| fun main() { | |
| val head = buildLinkedList() | |
| printListNodes(head) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package org.example | |
| import kotlin.math.max | |
| fun main() { | |
| val string = "abcaabgfhdbchfythgjgtuitijgjghjfhhdnnslphopoootkjjajhaabxvcgftyyihkjonpm" | |
| val result = findLongestSubstring(string) | |
| println("result: $result") | |
| println("asserted: ${(result == 9)}") |
OlderNewer