Skip to content

Commit 1f51ef7

Browse files
refactor 474
1 parent 0500991 commit 1f51ef7

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/_474.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-
* 474. Ones and Zeroes
5-
*
6-
* In the computer world, use restricted resource you have to generate maximum benefit is what we always want to pursue.
7-
* For now, suppose you are a dominator of m 0s and n 1s respectively.
8-
* On the other hand, there is an array with strings consisting of only 0s and 1s.
9-
* Now your task is to find the maximum number of strings that you can form with given m 0s and n 1s.
10-
* Each 0 and 1 can be used at most once.
11-
12-
Note:
13-
14-
The given numbers of 0s and 1s will both not exceed 100. The size of given string array won't exceed 600.
15-
16-
Example 1:
17-
Input: Array = {"10", "0001", "111001", "1", "0"}, m = 5, n = 3
18-
Output: 4
19-
Explanation: This are totally 4 strings can be formed by the using of 5 0s and 3 1s, which are “10,”0001”,”1”,”0”
20-
21-
Example 2:
22-
Input: Array = {"10", "0", "1"}, m = 1, n = 1
23-
Output: 2
24-
Explanation: You could form "10", but then you'd have nothing left. Better form "0" and "1".
25-
26-
*/
273
public class _474 {
284
public static class Solution1 {
295
public int findMaxForm(String[] strs, int m, int n) {

0 commit comments

Comments
 (0)