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
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] = {} | |
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 main | |
import "fmt" | |
type Cat struct { | |
Name string | |
Age int | |
} | |
type catOpt func(c *Cat) catOpt |