Expression evaluation 3

자료구조 | 수식 변환 계산 expression evaluation | postfix, prefix

Expression evaluation 파이썬 자료구조를 활용해서 수식을 계산해보자! 수식에는 + - * / 와 같은 연산자와 1 2 3 a b c와 같은 피연산자가 있다. 수식 = {연산자 operator} + {피연산자 operand} 이때 연산자는 산술 연산자(+ - / *), 논리 연산자(and or), 할당 연산자(=) 등이 있다. 수식을 표현하는 방식은 연산자의 위치에 따라 infix, postfix, prefix로 분류할 수 있다. infix notation 주로 사람이 쓰는 수식 표현 방식이다. a / b - c + d * e - a * c postfix notation 컴퓨터가 이해하기 위한 수식 표현 방식으로 연산자가 계산의 대상이 되는 피연산자 바로 뒤에 위치한다. infix nota..

자료구조 5-2장 | Linear Data Structure | 숙명여대 학점교류

학점교류로 듣는 숙명여대 자료구조 day 4. 2021.12.27. 월 INTRO 선형 큐를 리스트로 만들었다. 반면, Circular Queue는 None 만큼의 사이즈를 만들었다. Expression Evaluation 수식 변환 an expression consists of operator = arithmetic, logical, assignment operand = variable, constant types of expression notation depends on operator position against operand infix notation : a/b - c+d*e-a*c postfix notation : a b / c - d e * + a c * - prefix notation :..

자료구조 5장 | Linear Data Structure | 숙명여대 학점교류

학점교류로 듣는 숙명여대 자료구조 day 3. 2021.12.24. 금 Linear DS Stack Queue Circular Queue Expression Evaluation Maze Problem Stack 스택 last in first out LIFO Stack and Queue special types of ordered list elements are inserted, deleted thru one end of stack, called top applications procedure call management expression evaluation Balanced Parenthesis (5+6)*(9+8)/(6+2) open close가 같아야 한다. Decimal to Binary 123(1..