[Leetcode(릿코드)] 969. Pancake Sorting (Medium)
leetcode.com/problems/pancake-sorting/ Pancake Sorting - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 문제 정렬되지 않은 배열 arr[]이 주어진다 그리고 그 배열을 1~arr.length-1개를 골라서 뒤집을 수 있다 뒤집기를 반복하여 배열을 순차적으로 정렬하는 문제이다 예를들어 arr[] = {3,2,4,1}이 주어지면, 1. 먼저 앞에꺼 3개를 뒤집는다 {3,2,4} -> {4,2,3}, 그러면 {4,2,3,1..
2020. 11. 8.