'연속된 부분합' 태그의 글 목록
본문 바로가기 메뉴 바로가기

@Override

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

@Override

검색하기 폼
  • 분류 전체보기 (873)
    • Mobile (430)
      • iOS (216)
      • Android (210)
      • React Native (1)
      • Flutter (0)
    • Language (51)
      • Java (15)
      • Kotlin (2)
      • Python (7)
      • JavaScript (5)
      • Go (12)
      • PHP (3)
      • Ruby (1)
      • C,C++ (1)
      • HTML, CSS (5)
    • Backend (125)
      • Server (83)
      • Spring (5)
      • GraphQL (1)
      • Docker (19)
      • AWS (1)
      • Kafka (2)
    • Database (16)
    • Game Engine (2)
    • Build System (2)
    • Version Control (45)
    • CI,CD (4)
    • Tool (39)
    • IT (19)
    • Coding (19)
    • My (11)
    • OS (72)
    • Any (22)
    • Food (4)
      • 감자탕 (2)
      • 고기 (1)
    • English (3)
  • 방명록

연속된 부분합 (1)
Go. 연속된 부분합 구하기

Go를 이용한 연속된 부분합 구하기 방법입니다. package main import ( "fmt" "math" ) func main() { nums := []int{100, 2, 3, -110, 1, 4, 5, 6, 1, 7, 8, 9} result := maxSubSum(nums) fmt.Println(result) // 105 } func maxSubSum(nums []int) int { if len(nums) == 0 { return -1 } maxSum := float64(0) result := float64(math.MinInt64) if len(nums) == 1 { return int(result) } for index := -1; index < len(nums) - 1; index++ { ..

Coding 2020. 8. 2. 20:29
이전 1 다음
이전 다음
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
  • git
  • git - example
  • CocoaPods
TAG
  • github
  • SWIFT
  • git
  • centos8
  • tomcat
  • windows10
  • CentOS
  • Spring
  • Codable
  • rxswift
  • Linux
  • Gradle
  • Kotlin
  • war
  • android
  • enum
  • php
  • intellij
  • nodejs
  • go
  • cocoapods
  • Windows
  • Python
  • ubuntu
  • docker
  • Java
  • MySQL
  • golang
  • ios
  • Xcode
more
«   2025/05   »
일 월 화 수 목 금 토
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
글 보관함

Blog is powered by Tistory / Designed by Tistory

티스토리툴바