Anand Tests the Waters

Anand Test the Waters Header

This week’s code-crunch was straight from a real-life love story! Arun had the best answer to the code-crunch on

Anand won the #code-crunch on his second attempt! Anand had the best answer to the code-crunch on:

The input array representing a building blocks where the width of each block is 1, calculate how much water we can store in between the blocks.

Example 1: arr[] = [3, 1, 0,2]

Output: 3

The structure is like below:

|

| |

||_|

We can store 3 units of water in the middle gap.

Example 2: arr[] = [1, 0, 0, 2, 0, 4]

Output: 4

Structure is like below:

|

|

| |

|__|_|

We can store 4 units of water in the middle gap.

Related articles

A Little Diwali Fun at Work

This Diwali, we took a break from our usual work routine for two days of games, surprises, laughter, good food, and time together. From a competitive evening at Jelato to icebreakers and an Andhra feast, here’s a look at how we celebrated.

Read more
Contact us

Partner with Us for Comprehensive IT

We’re happy to answer any questions you may have and help you determine which of our services best fit your needs.

Your benefits:
What happens next?
1

We schedule a call at your convenience 

2

We do a discovery & consulting meeting 

3

We prepare a proposal 

Schedule a Free Consultation