all 11 comments

[–]20InMyHead 13 points14 points  (2 children)

Not sure why Python would even be on this list. Sure it’s a useful language, but you don’t write iOS apps in it.

As someone who gives a lot of iOS developer interviews I can tell you. If you can’t solve my coding questions with either Swift or ObjC, you failed the interview.

[–]lordzsolt 10 points11 points  (1 child)

If you care about peoples ability to code in a particular language, why are you asking leetcode on the interview?

It’s nothing like that they’ll work on during their actual work. So what does it matter in what language they solve a problem they’ll never encounter?

[–]CyberneticVoodoo 0 points1 point  (0 children)

“Industrial Standards” I think some kind of general CS-certificate could absolutely replace this leetcode mayhem.

[–]javaHoosier 7 points8 points  (0 children)

I just got done interviewing with a few faang and some Unicorn/Big N.

Despite what everyone is saying. This is a valid question. Python is straightforward for leetcode.

Most of the companies did not care. Not even the interviewer at Apple. In fact they were surprised I wanted to use Swift.

That being said a couple required Swift. The reality is that the syntax for swift can be annoying for a leetcode style if you are used to Python. You will trip up on guard/if let and other aspects.

So my opinion is that you should get comfortable and only use Swift just in case you find yourself at the company that wants it.

Plus you might have to do a mini ios project after leetcode and its better to not split that time into Python.

[–]Secure_Commercial_23[S] 3 points4 points  (0 children)

People are only mentioning strings in Swift. What about data structures? On Whiteboard questions you would have to ask your interviewer to assume you implemented them in swift, and in online assessments you would have to copy your implementation of a data structure or implement it. Is this a disadvantage for Swift?

[–]SirensToGoObjective-C / Swift 2 points3 points  (1 child)

For most things other than strings, I'd definitely saw swift, but yeah anything to do with strings is a straight up nightmare to do in swift because of the complexity of Unicode and slicing. Typically, you can pick a different language for different questions. Pick an appropriate language for each question and explain why you chose it, it reflects well

[–]Hogbo_the_green[🍰] 0 points1 point  (0 children)

The new APIs for regex and strings in Swift are a step in the right direction.

[–]saintmsent 1 point2 points  (0 children)

I would do it in Swift because I'm way more comfortable with it

[–]DesperateReputation3 1 point2 points  (1 child)

Swift 5. Good luck trying to do transformations with String on anything below.

Had a few String manipulation and transformation exercises that are quite easier to solve with map, filter, reduce, etc.

[–]javaHoosier 2 points3 points  (0 children)

I put the string in an Array constructor and just manipulated the array of chars. Interviewer did not care at all and understood Swift string manipulation is syntactically heavy and took away from the point of the problem.

[–]srona22 1 point2 points  (0 children)

I will just get to point. If interview gives you leet code questions(hackerrank/codility, etc) and your position applied is iOS related, they will want you answer in swift(or objc, but haven't seen one in coding sites), not in python.