is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.
CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.
Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.
Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.
func getValue(_ input: String) -> [String] {
- Hussain Shabbir May 28, 2019var nodeList = [Node<Dictionary<String, [[String]]>>]()
var tempArray = [[String]]()
let dictionary = ["1": ["A", "B", "C"], "2": ["D", "E"], "12": ["X"], "3": ["P", "Q"]]
for character in input {
if let values = dictionary[String(character)] {
tempArray.append(values)
}
}
let node = Node(list: [input: tempArray])
nodeList.append(node)
tempArray = [[String]]()
var j = 0
for i in stride(from: 2, to: input.count, by: 2) {
j = i
if let values = dictionary[String(input[input.startIndex ..< input.index(input.startIndex, offsetBy: i)])] {
tempArray.append(values)
}
}
while j < input.count {
j += 1
if let values = dictionary[String(j)] {
tempArray.append(values)
}
}
nodeList.append(Node(list: [input: tempArray]))
var finalArray = [String]()
var resultArray = [String]()
for node in nodeList {
resultArray = [String]()
for values in node.list[input]! {
if resultArray.isEmpty {
resultArray = values
} else {
var temp = [String]()
for value in values {
for result in resultArray {
temp.append("\(result)\(value)")
}
}
resultArray = temp
}
}
finalArray += resultArray
}
return finalArray
}
class Node<T> {
let list: T
init(list: T) {
self.list = list
}
}