From 90d0ee1f3260a728e9c6a33ebe120f7daebd9215 Mon Sep 17 00:00:00 2001 From: X-shuffle <53906918+X-shuffle@users.noreply.github.com> Date: Sun, 8 Aug 2021 23:08:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=200452.=E7=94=A8=E6=9C=80?= =?UTF-8?q?=E5=B0=91=E6=95=B0=E9=87=8F=E7=9A=84=E7=AE=AD=E5=BC=95=E7=88=86?= =?UTF-8?q?=E6=B0=94=E7=90=83=20go=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 添加 0452.用最少数量的箭引爆气球 go版本 --- .../0452.用最少数量的箭引爆气球.md | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/problems/0452.用最少数量的箭引爆气球.md b/problems/0452.用最少数量的箭引爆气球.md index bb3ebbdc..a4db9e88 100644 --- a/problems/0452.用最少数量的箭引爆气球.md +++ b/problems/0452.用最少数量的箭引爆气球.md @@ -175,6 +175,30 @@ class Solution: Go: +```golang +func findMinArrowShots(points [][]int) int { + var res int =1//弓箭数 + //先按照第一位排序 + sort.Slice(points,func (i,j int) bool{ + return points[i][0]b{ + return b + } + return a +} +``` Javascript: ```Javascript var findMinArrowShots = function(points) {