MCPcopy Create free account
hub / github.com/TheAlgorithms/C / numberOfWays

Function numberOfWays

leetcode/src/2222.c:28–30  ·  view source on GitHub ↗

numberOfWays returns the sum of number ways of selecting first building and the number of ways of selecting second building which gives us the number of ways of selecting three building such that no consecutive buildings are in the same category. Runtime: O(n) Space: O(n)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 1

numberOfWaysForCharFunction · 0.85

Tested by

no test coverage detected