본문 바로가기

헬창 개발자

검색하기
헬창 개발자
프로필사진 찬배

  • 분류 전체보기 (116)
    • 프로젝트 (19)
    • 자료구조 (12)
    • 알고리즘 (10)
    • 일상 (11)
    • 데이터 분석 (19)
    • 공부방 (45)
Guestbook
Notice
Recent Posts
Recent Comments
Link
«   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
Tags
  • 연결리스트
  • 공공데이터
  • 자료 구조
  • 크롤링
  • 백준
  • 이진탐색
  • FastAPI
  • 알고리즘
  • 큐
  • 빅데이터
  • 데이터베이스
  • 탐색
  • 자료구조
  • 텀프로젝트
  • 해시
  • 스택
  • LLM
  • 비동기
  • node.js
  • 서버
  • 파이썬
  • Express
  • 도커
  • 자바
  • 랭체인
  • C언어
  • 프로젝트
  • RAG
  • Docker
  • 노드
more
Archives
Today
Total
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록중위 표기법 (1)

헬창 개발자

스택을 이용한 후위 표기, 연산 : 파이썬

설계도 코드 class stack: def __init__(self): self.data= [] #스택 생성 self.cnt =0 def push(self,data): # 삽입 함수 self.data.append(data) self.cnt += 1 def isempty(self): # 공백 체크 return len(self.data)==0 def pop(self): # 삭제 함수 if not self.isempty(): self.cnt -= 1 return self.data.pop() def size(self): return len(self.data) def postfix(self, a): # 후위표기식 변경 self.temp = '' # 후위표기식 저장 for i in a: if i.isdigit():..

자료구조 2021. 7. 29. 16:34
Prev 1 Next

Blog is powered by kakao / Designed by Tistory

티스토리툴바