Skip to content

Commit a20b87b

Browse files
refactor 365
1 parent 8dd97d1 commit a20b87b

File tree

1 file changed

+0
-24
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+0
-24
lines changed

src/main/java/com/fishercoder/solutions/_365.java

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,5 @@
11
package com.fishercoder.solutions;
22

3-
/**
4-
* 365. Water and Jug Problem
5-
*
6-
* You are given two jugs with capacities x and y litres.
7-
* There is an infinite amount of water supply available.
8-
* You need to determine whether it is possible to measure exactly z litres using these two jugs.
9-
*
10-
If z liters of water is measurable, you must have z liters of water contained within one or both buckets by the end.
11-
12-
Operations allowed:
13-
14-
Fill any of the jugs completely with water.
15-
Empty any of the jugs.
16-
Pour water from one jug into another till the other jug is completely full or the first jug itself is empty.
17-
18-
Example 1: (From the famous "Die Hard" example)
19-
Input: x = 3, y = 5, z = 4
20-
Output: True
21-
22-
Example 2:
23-
Input: x = 2, y = 6, z = 5
24-
Output: False
25-
26-
*/
273
public class _365 {
284

295
public static class Solution1 {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy