You are viewing a single comment's thread. Return to all comments →
Did you get it? I still have timeout with tests 3, 6 and 7:
import Foundation let n = Int(readLine()!)! var arr: [String] = [] for _ in 0..<n { arr.append(readLine()!) } let list = arr.sorted() { a, b in let sizeA = a.characters.count let sizeB = b.characters.count if sizeA == sizeB { return a < b } else { return sizeA < sizeB } } for i in list { print(i) }
Seems like cookies are disabled on this browser, please enable them to open this website
Big Sorting
You are viewing a single comment's thread. Return to all comments →
Did you get it? I still have timeout with tests 3, 6 and 7: