In a tetrahedron OABC, find the number of ways to start from O and end up at O in exactly N hops
Asked in the Technical 2 stage.
Model the tetrahedron as a graph with vertices O, A, B, and C. Each hop must move along an edge, so staying at the same vertex is not allowed.
Implement count_returning_walks(n), where n is a non-negative integer. Return the exact number of distinct walks that start at O and return to O after exactly n hops.
def count_returning_walks(n):