Desktop only
Coding Challenges are optimized for Desktop
Come back on a wider screen - the live editor needs room to breathe. You can still read the problem brief above.
Come back on a wider screen - the live editor needs room to breathe. You can still read the problem brief above.
@dataclass
class Sample:
ts: float # when the snapshot was taken
stack: list[str] # call stack, outermost-first
@dataclass
class Event:
kind: str # 'start' or 'end'
ts: float # the sample's timestamp
name: str # function namedef samples_to_trace(samples: list[Sample]) -> list[Event]: ...def samples_to_trace(samples: list[Sample], min_count: int = 1) -> list[Event]: ...