Skip to content

Commit 0c043be

Browse files
Start Leetcode
- Single Number.
1 parent ff5bf03 commit 0c043be

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

LeetCode/Easy/Single Number/README.md

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
`Easy` `Codewriting` `300`
2+
3+
Given an array of strings, return another array containing all of its longest strings.
4+
5+
## Example
6+
7+
For `inputArray = ["aba", "aa", "ad", "vcd", "aba"]`, the output should be
8+
`allLongestStrings(inputArray) = ["aba", "vcd", "aba"]`.
9+
10+
## Input/Output
11+
12+
- [execution time limit] 4 seconds (go)
13+
14+
- [input] array.string inputArray
15+
16+
A non-empty array.
17+
18+
Guaranteed constraints: \
19+
`1 ≤ inputArray.length ≤ 10`, \
20+
`1 ≤ inputArray[i].length ≤ 10`.
21+
22+
- [output] array.string \
23+
Array of the longest strings, stored in the same order as in the inputArray.
24+
25+
## [Go] Syntax Tips
26+
27+
``` go
28+
// Prints help message to the console
29+
// Returns a string
30+
func helloWorld(name string) string {
31+
fmt.Printf("This prints to the console when you Run Tests");
32+
return "Hello, " + name;
33+
}
34+
```
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
class Solution {
2+
public int singleNumber(int[] nums) {
3+
return 0;
4+
5+
}
6+
}

0 commit comments

Comments
 (0)