Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 1fdd637

Browse files
committed
merge
2 parents 7d35a60 + 66a4447 commit 1fdd637

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

‎algorithm/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,17 @@ func findCss(nums [] int, start int, end int,mid int) int{
220220

221221
```
222222
- Majority Element
223+
224+
Code sample,
225+
```xml
226+
func majorityElement(nums []int) int {
227+
sort.Ints(nums)
228+
return nums[len(nums)/2]
229+
230+
}
231+
232+
```
233+
223234
- Kth Largest Element in an Array
224235

225236
Code sample

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /