1 / 3

후위표기 산술연산 알고리즘 _Main

후위표기 산술연산 알고리즘 _Main. “ 수식입력 ”;K. i = 1 to Len(k). M = mid(k, i, 1). No. M = “ 연산자 ”. call Push. Yes. call Pop. call Pop. call 연산. call Push. St(Top). 스택의 삭제 (POP). POP. Yes. Top < Min. 언더플로우. No. A1 = st(Top). Top = Top - 1. A2 = st(Top). Top = Top - 1. 스택의 푸쉬연산. PUSH.

linus
Télécharger la présentation

후위표기 산술연산 알고리즘 _Main

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 후위표기 산술연산 알고리즘_Main “수식입력”;K i = 1 to Len(k) M = mid(k, i, 1) No M = “연산자” call Push Yes call Pop call Pop call 연산 call Push St(Top)

  2. 스택의 삭제(POP) POP Yes Top < Min 언더플로우 No A1 = st(Top) Top = Top - 1 A2 = st(Top) Top = Top - 1

  3. 스택의 푸쉬연산 PUSH Yes Top = Max 오버플로우 No Top = Top + 1 ST(Top) = M

More Related