Aracade Intro #15 AddBorder, Codefights, CodeSignal, 코드파이트, 코드시그널, c++ java c# scalar
Aracade Intro #15 AddBorder, Codefights, CodeSignal Q. Given a rectangular matrix of characters, add a border of asterisks(*) to it. 주어진 글자 매트릭스에다가, 외곽에 * 테두리를 추가하라 e.g. Input -> picture = ["abc", "ded"] Output -> addBorder(picture) = ["*****", "*abc*", "*ded*", "*****"] Input -> ["aa", "**", "zz"] Output ->["****", "*aa*", "****", "*zz*", "****"] 테투리에 * 을 만듦. for 문 2개로 조건문을 만들어서 할까 했는데,1개씩 써서 순..
Aracade Intro #13 ReverseParentheses, Codefights, CodeSignal, 코드파이트, 알고리즘, algorithm
Aracade Intro #13 ReverseParentheses, Codefights, CodeSignal, 코드파이트, 알고리즘, algorithm 이거 진짜 재귀로 풀기 젼나 빡쎘슴.. It was hella hard to solve using recursive.. Q. You have a string s that consists of English letters, punctuation marks, whitespace characters, and brackets. It is guaranteed that the parentheses in s form a regular bracket sequence. Your task is to reverse the strings contained in each pai..
Aracade Intro #12 SortByHeight
CodeFights, CodeSignal arcade #12 SortByHeight Rearrange the people by their heights in a non-descending order without moving the trees. ( -1 would be tree ) 입력받은 사람들의 키와 나무(-1) 값 배열에서, 나무값의 위치는 건드리지 않고 사람들의 키를 오름차순 정렬하라 e.g. a = [-1, 150, 190, 170, -1, -1, 160, 180] sortByHeight(a) = [-1, 150, 160, 170, -1, -1, 180, 190] 함수를 통과하고 정렬된 값 //Process//1. Input height vector//2. Iterate from 1 to the..