MCPcopy
hub / github.com/austingebauer/go-leetcode / NewNestedInteger

Function NewNestedInteger

flatten_nested_list_iterator_341/solution.go:34–43  ·  view source on GitHub ↗
(value any)

Source from the content-addressed store, hash-verified

32}
33
34func NewNestedInteger(value any) *NestedInteger {
35 var isInt bool
36 if _, ok := value.(int); ok {
37 isInt = true
38 }
39 return &NestedInteger{
40 value: value,
41 isInt: isInt,
42 }
43}
44
45func (this NestedInteger) IsInteger() bool {
46 return this.isInt

Callers 1

TestIteratorFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestIteratorFunction · 0.68