Continuous 1s with k flips and expected journey length in a graph
Filed under CodeNation
The question
First, find the maximum number of continuous 1s in a binary string when allowed to perform at most k flips. Second, given an acyclic graph with n nodes and n-1 edges of unit length where each child is visited with equal probability, compute the expected total length of a journey.
No write-up yet. Related questions below have one.
Related CodeNation questions
Collected from public candidate posts and coding forums. Updated Nov 2026.