본문 바로가기 메뉴 바로가기

Peppo

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

Peppo

검색하기 폼
  • 분류 전체보기 (221)
    • Story (13)
    • iOS (143)
      • Error (11)
    • 알고리즘 (43)
    • ETC (7)
    • React-Native (0)
    • CS (Computer science) (3)
  • 방명록

Swift 최댓값 만들기(2) (1)
[Swift 알고리즘] - 최댓값 구하기(2) (Programmers)

https://school.programmers.co.kr/learn/courses/30/lessons/120862 문제 사진 내 풀이 테스트케이스 7번에서 실패하는데 이유를 모르겠다.. ㅠㅠ import Foundation func solution(_ numbers:[Int]) -> Int { var maxValue: Int = 0 for i in 0...numbers.count - 1 { for j in 0...numbers.count - 1 { if i != j { maxValue = max(maxValue, numbers[i] * numbers[j]) } } } return maxValue } solution([1, 4, 4, 5, 7, 7]) 최대값을 저장하는 maxValue 변수를 만든다. 두..

알고리즘 2022. 10. 28. 11:02
이전 1 다음
이전 다음
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
  • Peppo's Github
TAG
  • Swift 프로그래머스
  • Swift 내림차순
  • Class
  • swift (programmers)
  • ios
  • Swift 프로퍼티
  • RTCCameraVideoCapturer
  • 2023년 회고
  • Swift inout
  • 원티드 프리온보딩
  • swift 고차함수
  • Swift init
  • Swift Leetcode
  • RIBs tutorial
  • Swift joined
  • CS 네트워크
  • Swift final
  • removeLast()
  • Swift joined()
  • Swift 알고리즘
  • Swift Error Handling
  • Combine: Asynchronous Programming with Swift
  • Swift
  • Swift RIBs
  • swift property
  • Swift ModernRIBs
  • swift programmers
  • swift reduce
  • swift protocol
  • iOS error
more
«   2025/07   »
일 월 화 수 목 금 토
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

티스토리툴바