Solution to Codility lesson5 Stone Wall problem, link to Codility problem and complete solution at the end of the post. Definitions: Context (from Codility): You are going to build a stone wall. It should have different heights in different places. The height of the wall is specified by a zero-indexed array H. H[I] […]

# Codility – Brackets

Solution to Codility lesson5 Brackets problem, link to Codility problem and complete solution at the end of the post. Definitions: Properly nested string S: S is empty; S has the form “(U)” or “[U]” or “{U}” where U is a properly nested string; S has the form “VW” where V and W are properly nested […]

# Codility – Fish

Solution to Codility lesson5-exercise2 Fish problem, link to Codility problem and complete solution at the end of the post. Definitions: Context (from Codility): You are given two non-empty zero-indexed arrays A and B consisting of N integers. Arrays A and B represent N voracious fish in a river, ordered downstream along […]

# Codility – Nesting

Solution to Codility lesson5-exercise1 Nesting problem, link to Codility problem and complete solution at the end of the post. Definitions: Properly nested string S: S is empty; S has the form “(U)” where U is a properly nested string; S has the form “VW” where V and W are properly nested strings. Problem: Define a […]