This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Last login: Sun Jan 29 14:33:59 on ttys003 | |
Keitas-MacBook:~ keitaito$ cd /Users/keitaito/dev/Xcode/Repos/Clones/Rainforest | |
Keitas-MacBook:Rainforest keitaito$ | |
Keitas-MacBook:Rainforest keitaito$ | |
Keitas-MacBook:Rainforest keitaito$ | |
Keitas-MacBook:Rainforest keitaito$ rake bootstrap | |
/Users/keitaito/.rbenv/versions/2.3.2/bin/bundle | |
-------------------------------------------------------------------------------- | |
Fetching repositories list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// HackerRankChallengeSolution-Kangaroo.swift | |
// Kangaroo | |
// | |
// Created by Keita Ito on 1/29/17. | |
// Copyright © 2017 Keita Ito. All rights reserved. | |
// | |
// https://www.hackerrank.com/challenges/kangaroo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// main.swift | |
// DesignerPDFViewer | |
// | |
// Created by Keita Ito on 1/26/17. | |
// Copyright © 2017 Keita Ito. All rights reserved. | |
// | |
// The link to the challenge: https://www.hackerrank.com/challenges/designer-pdf-viewer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://www.hackerrank.com/challenges/the-love-letter-mystery | |
let t = Int(readLine()!)! | |
var inputs = [String]() | |
for i in 0..<t { | |
let string = readLine()! | |
inputs.append(string) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add Foundation import to be able to use NSDate class below. | |
import Foundation | |
print("Hello, world!") | |
// There is always one argument passed, which is the name of the program, | |
// that is the file name. | |
if CommandLine.argc < 2 { | |
print("No arguments are passed.") | |
let firstArgument = CommandLine.arguments[0] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add Foundation import to be able to use NSDate class below. | |
import Foundation | |
print("Hello, world!") | |
// There is always one argument passed, which is the name of the program, | |
// that is the file name. | |
if CommandLine.argc < 2 { | |
print("No arguments are passed.") | |
let firstArgument = CommandLine.arguments[0] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add Foundation import to be able to use NSDate class below. | |
import Foundation | |
print("Hello, world!") | |
// There is always one argument passed, which is the name of the program, | |
// that is the file name. | |
if CommandLine.argc < 2 { | |
print("No arguments are passed.") | |
let firstArgument = CommandLine.arguments[0] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print("Hello, world!") | |
// There is always one argument passed, which is the name of the program, | |
// that is the file name. | |
if CommandLine.argc < 2 { | |
print("No arguments are passed.") | |
let firstArgument = CommandLine.arguments[0] | |
print(firstArgument) | |
} else { | |
print("Arguments are passed.") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print("Hello, world!") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Updated to Swift 3 syntax. | |
func mapScalarValues(s: String, f: (UInt32) -> UInt32) -> String { | |
let scalars = Array(s.unicodeScalars) | |
let encrypted = scalars.map { x in | |
Character(UnicodeScalar(f(x.value))!) | |
} | |
return String(encrypted) | |
} |
NewerOlder