낭중지추
  • 홈
  • 태그
  • 방명록
    • 전체 (36)
      • Development (35)
        • Git (0)
        • Nginx (1)
        • Docker (1)
        • Algorithm (2)
        • React (1)
        • Architecture (1)
        • Javascript & Typescript (3)
        • NestJS (5)
        • Computer Science (0)
        • Node (1)
        • Etc (3)
        • Sequelize (1)
        • TypeORM (1)
        • SQL (4)
        • MongoDB (2)
        • MySQL (3)
        • PostgreSQL (1)
        • Java (4)
        • Blockchain (1)
      • 투자 (1)
        • 주식 (1)
      • 생각정리 (0)
        • 도서 (0)
        • 끄적끄적 (0)
  • 글작성
  • 방명록
  • 환경설정
  • 메뉴 닫기
Python 검색 결과
2 개의 검색 결과가 있습니다.
Development/Algorithm

[Python] bisect 활용 예시

bisect는 이진탐색(binary search)일 때 유용하게 사용 가능하다 이진탐색이란 간단하게 정렬되어 있는 배열내에서 특정 값을 찾아내는 것이다. [1, 2, 3, 3, 3, 3, 4, 5, 6] 위와 같이 정렬된 배열이 존재할 때 3 의 갯수를 구하고 싶으면 bisect를 활용하면 된다. def count_by_sorted_array(array, left_value, right_value): right_index = bisect_right(array, right_value) left_index = bisect_left(array, left_value) return right_index - left_index bisect_left(literable, value) : 왼쪽 인덱스를 구하기 bise..

2022. 3. 20. 17:08
Development/Etc

[Mac] Python 버전 변경 해주기

brew update brew install python brew info python ===> Caveats 부분을 찾는다 ==> Caveats Python has been installed as /usr/local/bin/python3 Unversioned symlinks `python`, `python-config`, `pip` etc. pointing to `python3`, `python3-config`, `pip3` etc., respectively, have been installed into /usr/local/opt/python@3.9/libexec/bin /usr/local/opt python@3.9/libexec/bin 이 부분을 아래와 같이 PATH 로 지정 export PATH=/..

2021. 2. 23. 23:03
  • «
  • 1
  • »

공지사항

전체 카테고리

  • 전체 (36)
    • Development (35)
      • Git (0)
      • Nginx (1)
      • Docker (1)
      • Algorithm (2)
      • React (1)
      • Architecture (1)
      • Javascript & Typescript (3)
      • NestJS (5)
      • Computer Science (0)
      • Node (1)
      • Etc (3)
      • Sequelize (1)
      • TypeORM (1)
      • SQL (4)
      • MongoDB (2)
      • MySQL (3)
      • PostgreSQL (1)
      • Java (4)
      • Blockchain (1)
    • 투자 (1)
      • 주식 (1)
    • 생각정리 (0)
      • 도서 (0)
      • 끄적끄적 (0)
  • 최근 글
  • 최근 댓글

최근 글

최근댓글

태그

  • #NestJS
  • #typeorm
  • #solid
  • #Migration
  • #Spring
  • #OOP
  • #TypeScript
  • #MySQL
  • #객체지향
  • #Big Sur
더보기+

전체 방문자

오늘
어제
전체

블로그 인기글

Powered by Privatenote/라이프코리아 Copyright © 낭중지추 All rights reserved. TistoryWhaleSkin3.4

티스토리툴바