Skip to main content

Water Jug Problem: 5 liter jug and 7 liter jug are provided. Measure 6 liter within the 7 liter jug.

Let, we have infinite supply of water and two jugs capable to contain exactly 7 and 5 liters. Measure 6 liter within in 7 liter jug.

Step 01: Fill up the 7 liter => (7, 0)
Step 02: Pour into the 5 liter => (2, 5)
Step 03: Empty the 5 liter => (2, 0)
Step 04: Pour into the 5 liter => (0, 2)
Step 05: Fill up the 7 liter => (7, 2)
Step 06: Pour into the 5 liter => (4, 5)
Step 07: empty the 5 liter => (4, 0)
Step 08: Pour into the 5 liter => (0, 4)
Step 09: Fill up the 7 liter => (7, 4)
Step 10: Pour into the 5 liter => (6,5)
Step 11: Empty the 5 liter => (6, 0)

Now 7 liter jug contain 6 liter water.

-- Cheers !!!


Comments

Popular posts from this blog

Checking operating system version: must be 5.0, 5.1 or 5.2 Actual 6.1 Failed

This error occurred when we are installing old oracle software in latest OS (Operating System).   Basically Its’s occurring on windows platform.

Oracle forms 11g default configuration file formsweb.cfg

#formsweb.cfg defines parameter values used by the FormsServlet # formsweb.cfg defines parameter values used by the FormsServlet (frmservlet) # This section defines the Default settings. Any of them may be overridden in the # following Named Configuration sections. If they are not overridden, then the # values here will be used. # The default settings comprise two types of parameters: System parameters, # which cannot be overridden in the URL, and User Parameters, which can. # Parameters which are not marked as System parameters are User parameters. # SYSTEM PARAMETERS