110. rny_string
import Foundation func solution(_ rny_string:String) -> String { var string : String = "" string = rny_string.map{String($0) == "m" ? "rn" : String($0)}.joined() ...
import Foundation func solution(_ rny_string:String) -> String { var string : String = "" string = rny_string.map{String($0) == "m" ? "rn" : String($0)}.joined() ...
import Foundation func solution(_ myString:String, _ pat:String) -> Int { var string : String = "" var answer : Int = 0 string = myString.map{String($0)=="A" ? "B"...
import Foundation func solution(_ myString:String) -> [String] { var answer : [String] = [] answer = myString.split(separator:"x").map{String($0)}.sorted() return ans...
import Foundation func solution(_ myString:String) -> [Int] { var answer : [Int] = [] answer = myString.split(separator: "x", omittingEmptySubsequences: false).map{String(...
import Foundation func solution(_ num:Int, _ total:Int) -> [Int] { var arr : [Int] = [] var start = (total/num)-(num/2) var end = (total/num)+(num/2) arr = nu...
import Foundation func solution(_ numbers:[Int], _ direction:String) -> [Int] { var arr : [Int] = [] var answer : [Int] = [] arr = numbers if direction == "left" {...
import Foundation func solution(_ box:[Int], _ n:Int) -> Int { var answer : Int = 0 var volume : Int = 0 volume = box.reduce(1,*) answer = volume / (n*n*n) ...
import Foundation func solution(_ n:Int) -> Int { var answer : Int = 0 var i : Int = 1 var num : Int = 0 while n >= i { num = 0 for int in 1 ......
import Foundation func solution(_ my_string:String) -> [String] { var answer = my_string.split(separator: " ").map{String($0)} return answer } 구분자를 기준으로 나눠주는 split ...