• Image placeholder
  • 홈 페이지
  • 블로그 센터
  • 범주
Image placeholder

조이스틱

[Java] level2 - greedy_42839 : 조이스틱

로직 상하 움직임 A가 아닌 값은 위아래로 몇번 움직이면 되는지 구하면 된다 A~Z까지 diff에 위 or 아래로 몇번 움직이는게 최단인지 담아둔다. diff 길이가 알파벳 갯수와 동일하고 diff의 idx는 알파벳에서의 idx와 동일 => diff에서 idx 1번은 B를 의미, idx 25번은 Z를 의미 좌우 움직임 좌우 움직임을 가져가려면 1) 우측 + 우측되돌아가기 + 좌측, 2) 좌측...

greedy조이스틱greedy

© 2022 intrepidgeeks.com

Privacy Policy Contact US Sitemap
🍪 This website uses cookies to ensure you get the best experience on our website. Learn more