Introduction (5 Mins)
Introduce yourself.
Ask the candidate to talk about themselves.
Questions from resume/recent work.
Questions about how you work, and find information.
Technical Questions.
Candidate questions.
Pass by reference, pass by value
var arr1 = [ 1 , 2 , 3 ]
var arr2 = arr1
arr2. append ( 4 )
var len = arr1. count
print ( len)
What is the output of this code snippet?
What is this concept called and can you explain it?
func myFun( ) {
guard false else {
print ( " This block is run " )
return
}
print ( " This is never run " )
}
myFun ( )
What is the output of this code snippet?
Why would I use a guard block instead of an if block?
protocol TextFile {
var name : String { get }
}
protocol Book : TextFile {
var author : String { get set }
}
struct BookImpl : Book {
var name : String
var author : String
init ( name: String , author: String ) {
self . name = name
self . author = author
}
}
class Reader {
private let textfile : TextFile
init ( textfile: TextFile ) {
self . textfile = textfile
}
func printName( ) -> String {
return self . textfile. name
}
func printAuthor( ) -> {
let book = textfile as Book
return book. author
}
}
let book = BookImpl ( name: " The fellowship of the ring. " , author: " J.R.R Tolkien " )
let reader = Reader ( textfile: book)
print ( reader. printName ( ) )
print ( reader. printAuthor ( ) )
I have sent this to you in a pull request, I am a junior developer. What kind of comments or questions do you have?
Do you think this code compiles? Yes, no, what would we have to do to make this compile.
Can you explain to me the differences the the use cases for the keywords, is, as, as! and as?
What is the difference between a class and a struct?
What are the trade-offs for companies implementing swift-UI?
What are your thoughts on documenting code, none, a little bit, or too much is never enough?
Have you used graphQL? If so, can you tell me some positives and negatives vs REST?
You have to design a back end API that returns responses to iOS, android and web.
What kind of considerations should you keep in mind?
What kind of differences if any would there need to be for android clients?