Skip to content

Commit 6fd365a

Browse files
committed
feat: 연산자 비교 메서드 예제 코드 구현
1 parent ae74fa5 commit 6fd365a

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package stack;
2+
3+
public class InfixToPostfix {
4+
5+
public char[] convertInputToCharArray(String input) {
6+
return null;
7+
}
8+
9+
public char[] convertInfixToPostfix(char[] input) {
10+
return null;
11+
}
12+
13+
public int compareOperator(char op1, char op2) {
14+
OperatorPriority op1Priority = OperatorPriority.getOperatorPriority(op1);
15+
OperatorPriority op2Priority = OperatorPriority.getOperatorPriority(op2);
16+
return op1Priority.getPriority() - op2Priority.getPriority();
17+
}
18+
}

0 commit comments

Comments
 (0)