본문 바로가기
728x90

codingtest3

[code signal / 코드시그널] are Equally Strong ✨ Description Call two arms equally strong if the heaviest weights they each are able to lift are equal. Call two people equally strong if their strongest arms are equally strong (the strongest arm can be both the right and the left), and so are their weakest arms. Given your and your friend's arms' lifting capabilities find out if you two are equally strong. ✨ 문제 들어올릴 수 있는 가장 무거운 무게가 같으면 두 팔을 똑.. 2022. 5. 30.
[code signal / 코드시그널] Sort by height ✨ Description Some people are standing in a row in a park. There are trees between them which cannot be moved. Your task is to rearrange the people by their heights in a non-descending order without moving the trees. People can be very tall! ✨ 문제 몇몇 사람들이 공원에서 일렬로 서 있다. 그들 사이에는 움직일 수 없는 나무들이 있다. 당신의 임무는 나무를 움직이지 않고 사람들을 그들의 키에 따라 오름차순으로 정렬시키는 것이다. 사람들의 키가 매우 클 수 있다. 👉 배열에 -1로 주어진 나무의 위치는 변경시키지 않고.. 2022. 5. 30.
[code signal / 코드 시그널] alternatingSums ✨ Description Several people are standing in a row and need to be divided into two teams. The first person goes into team 1, the second goes into team 2, the third goes into team 1 again, the fourth into team 2, and so on. You are given an array of positive integers - the weights of the people. Return an array of two integers, where the first element is the total weight of team 1, and the second.. 2022. 5. 30.
728x90