Skip to content

Instantly share code, notes, and snippets.

View mahiro72's full-sized avatar
♨️

mahiro mahiro72

♨️
View GitHub Profile
@mahiro72
mahiro72 / self_referential_functions.go
Last active July 30, 2023 16:17
self-referential functions practice
package main
import "fmt"
type Cat struct {
Name string
Age int
}
type catOpt func(c *Cat) catOpt
@mahiro72
mahiro72 / trie_with_frequency_cache.py
Last active March 10, 2025 17:16
Python Trie Implementation with Frequency Cache
from typing import Dict
class TrieNode:
def __init__(self):
self.children: Dict[str, TrieNode] = {}
self.is_end = False
self.freq = 0
self.top_words: Dict[str, int] = {}