Skip to content

Instantly share code, notes, and snippets.

View glxxyz's full-sized avatar
💭
Learning Go, liking it

Alan Davies glxxyz

💭
Learning Go, liking it
View GitHub Profile
@glxxyz
glxxyz / 24-game-dumb.java
Last active May 23, 2020 20:28
Leetcode 24 Game dumb solutions - don't try this at home (or in an interview). My IntelliJ died to bring you this - https://leetcode.com/problems/24-game
/*
Runtime: 0 ms, faster than 100.00% of Java online submissions for 24 Game.
Memory Usage: 36.5 MB, less than 100.00% of Java online submissions for 24 Game.
*/
class Solution {
public boolean judgePoint24(int[] nums) {
@glxxyz
glxxyz / rune-byte-strings.go
Last active June 5, 2020 14:08
Go strings as bytes and runes: 3 for loops and 2 slices
package main
import (
"fmt"
)
// Try it out here: https://repl.it/@glxxyz/RoundedNormalFunction
// It's important to note the different values that 'index' takes
// when using []rune and range