Skip to content

Commit 2d890c1

Browse files
refactor 425
1 parent 17a6578 commit 2d890c1

File tree

1 file changed

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

1 file changed

+0
-66
lines changed

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

Lines changed: 0 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -3,72 +3,6 @@
33
import java.util.ArrayList;
44
import java.util.List;
55

6-
/**
7-
* 425. Word Squares
8-
*
9-
* Given a set of words (without duplicates), find all word squares you can build from them.
10-
11-
A sequence of words forms a valid word square if the kth row and column read the exact same string, where 0 ≤ k < max(numRows, numColumns).
12-
13-
For example, the word sequence ["ball","area","lead","lady"] forms a word square because each word reads the same both horizontally and vertically.
14-
15-
b a l l
16-
a r e a
17-
l e a d
18-
l a d y
19-
20-
Note:
21-
22-
There are at least 1 and at most 1000 words.
23-
All words will have the exact same length.
24-
Word length is at least 1 and at most 5.
25-
Each word contains only lowercase English alphabet a-z.
26-
27-
Example 1:
28-
29-
Input:
30-
["area","lead","wall","lady","ball"]
31-
32-
Output:
33-
[
34-
[ "wall",
35-
"area",
36-
"lead",
37-
"lady"
38-
],
39-
[ "ball",
40-
"area",
41-
"lead",
42-
"lady"
43-
]
44-
]
45-
46-
Explanation:
47-
The output consists of two word squares. The order of output does not matter (just the order of words in each word square matters).
48-
49-
50-
Example 2:
51-
52-
Input:
53-
["abat","baba","atan","atal"]
54-
55-
Output:
56-
[
57-
[ "baba",
58-
"abat",
59-
"baba",
60-
"atan"
61-
],
62-
[ "baba",
63-
"abat",
64-
"baba",
65-
"atal"
66-
]
67-
]
68-
69-
Explanation:
70-
The output consists of two word squares. The order of output does not matter (just the order of words in each word square matters).
71-
*/
726
public class _425 {
737

748
public static class Solution1 {

0 commit comments

Comments
 (0)