[LeetCode] 121. Best Time to Buy and Sell Stock - Java
·
알고리즘/LeetCode
https://leetcode.com/problems/best-time-to-buy-and-sell-stock/ 문제 You are given an array prices where prices[i] is the price of a given stock on the ith day. You want to maximize your profit by choosing a single day to buy one stock and choosing a different day in the future to sell that stock. Return the maximum profit you can achieve from this transaction. If you cannot achieve any profit, ret..
[LeetCode] 217. Contains Duplicate - Java
·
알고리즘/LeetCode
https://leetcode.com/problems/contains-duplicate/ 문제 Given an integer array nums, return true if any value appears at least twice in the array, and return false if every element is distinct. Example 1: Input: nums = [1,2,3,1] Output: true Example 2: Input: nums = [1,2,3,4] Output: false Example 3: Input: nums = [1,1,1,3,3,4,3,2,4,2] Output: true Constraints: 1
[Flutter] 윈도우 플러터 개발환경 세팅하기
·
개발/Flutter
목차 1. 플러터 설치 2. 안드로이드 스튜디오 설치 3. 안드로이드 스튜디오 설정 4. Windows 환경변수 설정 5. 플러터 설치 확인 1. Flutter 설치 구글에서 flutter install 검색하여 플러터 다운로드 사이트 접속 혹은 https://docs.flutter.dev/get-started/install 링크 접속 OS 환경에 맞는 플러터 설치 zip 파일 다운로드 다운로드가 완료되면 설치를 원하는 경로에 압축 해제 플러터가 설치된 경로는 추후 Windows 환경변수 설정에 필요하니 기억해 두기 2. 안드로이드 스튜디오 설치 구글에서 안드로이드 스튜디오 설치 검색하여 사이트 접속 안드로이드 스튜디오 다운로드 버튼 클릭 다운로드 받은 파일을 실행하여 설치 진행 Android Virtu..
[LeetCode] 1. Two Sum - Java
·
알고리즘/LeetCode
https://leetcode.com/problems/two-sum/ 문제 Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You may assume that each input would have exactly one solution, and you may not use the same element twice. You can return the answer in any order. Example 1: Input: nums = [2,7,11,15], target = 9 Output: [0,1] Explanation: Because nu..
[파이썬] 코인 자동매매 프로그램 만들기 #6 - 오류 수정
·
개발/Python
자동매매 프로그램을 실행하고 3일이 지나고 슬랙을 살펴보았는데 위와 같이 매일 자정마다 오류가 발생했습니다... 자정마다 발생한 오류라면 매도 시도나 데이터 갱신을 하는 함수에서 오류가 발생했을 가능성이 큽니다 while True : try : now = datetime.datetime.now() if openTime < now < openTime + datetime.timedelta(seconds=5) : openTime = datetime.datetime(now.year, now.month, now.day) + datetime.timedelta(1) self.sell_coin() # 매도 시도 self.get_today_data() # 데이터 갱신 current_price = pyupbit.get_c..
HYOJUN
도전하고 기록하기