Skip to content

Instantly share code, notes, and snippets.

View odrianoaliveira's full-sized avatar

Adriano de Oliveira odrianoaliveira

View GitHub Profile
@odrianoaliveira
odrianoaliveira / giscompletion.amazon.com.MD
Last active May 15, 2025 13:50
How-to use the completion.amazon.com API
  • 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
@odrianoaliveira
odrianoaliveira / TwoSum.kt
Created February 27, 2026 16:32
Two Sum kotlin solution
// 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))
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)
package org.example
import kotlin.math.max
fun main() {
val string = "abcaabgfhdbchfythgjgtuitijgjghjfhhdnnslphopoootkjjajhaabxvcgftyyihkjonpm"
val result = findLongestSubstring(string)
println("result: $result")
println("asserted: ${(result == 9)}")