maze problem 3

자료구조 | Maze Problem | linear DS

미로 탈출하기 문제 : 입구로부터 출구로 나가는 길을 찾아라! 조건 : 0은 움직일 수 있는 길, 1은 불가능한 길이다. 방향 : 상하좌우, 대각선으로 움직일 수 있다. 추가적인 안내 미로는 2차원 배열에 구현되어 있다. 입구는 maze[0][0]이고, 출구는 maze[row-1][col-1]이다. 나가는 길을 찾기 위해 move[0] move[1] move[2] move[3] 을 사용할 수 있다. maze[next_row][next_col] = ? mark라는 배열을 만들어 지나온 길을 기록해둔다. mark = [[0]*10 for i in range(10)] mark=[[0]*10 for i in range(10)] print(mark) path stack backtracking을 위한 stack으로..

자료구조 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..