길찾기게임 - 이진탐색(전위,후위)
programmers.co.kr/learn/courses/30/lessons/42892 코딩테스트 연습 - 길 찾기 게임 [[5,3],[11,5],[13,3],[3,5],[6,1],[1,3],[8,6],[7,2],[2,2]] [[7,4,6,9,1,8,5,2,3],[9,6,5,8,1,4,3,2,7]] programmers.co.kr #include #include #include using namespace std; struct Node{ int x; int y; int number; Node * left; Node * right; }; bool desc( Node a, Node b) { if(a.y == b.y){ return a.xb.y; } void addNode(Node *parent, Node *..