Monday, February 23, 2015

Amazon and Microsoft Interview Experience

------------------------------------------------------------------------------------------------------------------------

First Microsoft Interview  01/12


I applied for a SDET role in Microsoft during my last semester of Masters study. After few days, I received a call from recruiter and she scheduled a phone interview.

Phone interview :

  • He asked me about my experience and introduced himself.
  • Check if a number is prime
  • nth Fibonacci number
Few Days Later, Recruiter gave a call and said “ They wanna move forward with my application and I have to be in Seattle for a on-site interview soon”.

Days passed on.. 

After 2 weeks i sent them an email about further process and She replied they would get back to me soon.

After 2 more weeks… i got the same reply…..

And after 1 month i got a reply… They filled this position with another person.

I was like WTF… :( and decided never to apply for Microsoft in near future.

------------------------------------------------------------------------------------------------------------------------

Interview with Amazon 11/14


I applied for a Amazon SDE role in indeed. After Few Days i got an email from recruiter to provide available timings for a quick discussion about position.

Recruiter call :

She explained me whole lot of things about amazon and asked me to fill-in few docs which she provided in email.

After a week , i received a email from amazon to participate in online interview which had 8-10 questions and two of them were coding related

Online Interview:

  • Design a 3D graphics API -  OOP
  • File manipulation related - Need to move content in one format to another (Basic knowledge of Regular expressions should be enough to solve this )
I was able to answer all the questions within time frame and was very confident about further rounds.

After one week, I received an email from amazon and they were willing to move froward with on-site interview. At First they said it would be in Houston,TX and asked me to fill-in travel information. Fortunately, i was in Seattle WA working for ATT during this period and After going through the travel doc i have provided, they requested me to have this interview in Seattle itself.
I agreed to that and have forwarded my available dates.

On-site Interview :

It was a day long marathon which started at 10AM till 4PM.
HR Round : 15minsThis was not an actual interview. She took me around their new building in Seattle, explained much about amazon and their leadership goals. At last she dropped me at a conference room where my first round interviewer was ready. 
First Round : 1 hr
  • Difference between hashcode and equals in java  - I explained him about these two methods in Object class but couldn't figure out a relation between them :(
  • Red-black Tree. 
  • Tree Traversal - DFS, BFS, in-order, pre-order, post-order traversal.
Second Round - Bar raiser ? : 1 hr
  • Explained him about projects i worked on earlier and difficult problems which i solved in it.
  • Find largest palindrome sub-sequence - I came up with O(nlogn) solution for this but there is an O(n) algorithm for the same which i realized after coming home.
Lunch : one of their developer took me to lunch and said he wont be in interview panel so feel comfortable. We had our lunch in nearby restaurant and he dropped me back at the same conference room. 
Third Round : 1 hr
  • Sorting algorithms
Fourth Round : 1hr
  • Shortest path in un-weighted graph - I explained him theoretically well but coding on white-bored with my bad hand writing was really horrible.
Last Round : 1 hr
  • Design search suggestions which we get in google while we start typing words. - He asked me to discuss about data structure for this scenario. I came up with skip list which was really apt for this, even interviewer was impressed with it.
  • Discussion about previous projects
I was very happy with my performance and was very sure of getting into amazon. Except for the points i have highlighted above

End Result : Dint got offer.

I did prepared very well, spent enough time going through most of algorithms but that was one odd problem which knocked me down.



------------------------------------------------------------------------------------------------------------------------

Interview with Microsoft 11/14 :


As i pointed out in first few lines, I was really pissed-off with MS and have never applied to it. I took it so serious that i even stopped using windows OS or other products of MS.

Got a call from external recruiter and she was talking about my application for a job in Microsoft. I replied her of not doing such a foolish thing in a polite manner.

She Replied
 “Well Ok, I have passed on job req to your email. If you feel interested just let me know”.

 I said Ok and dint Replied :)

A week later, i got another email where she was asking about my thoughts on it. 

Meanwhile, i was interviewing with Amazon and they dint offered me a job. This forced me to apply for Microsoft and even job description was good enough.

First Telephone Interview :

  • Few linux commands
  • How do you solve a programming issue - I just google based on error and check if there is similar problem resolved earlier.
    He said “Its totally ok for me whether u would use bing or google but in further rounds be cautions. some ppl at microsoft take it serious”. I laughed a little and said ok.
  • He gave me some info about team and what they are working on 
  • How do you check memory overflow
I got a call from external recruiter the other day and she said they got an excellent feedback  from interviewer. She scheduled another on-site interview in their Seattle office.

First F2F interview :

I went to MS office early in the morning. Interviewer came to front-desk at 10AM and took me to his allotted room. He wasn't part of the team which is planning to hire me and he dint even knew anything about that project too.  
  • Previous experience
  • Interesting project which i worked on
  • He went deep into that project and have asked many questions which i answered very patiently 
  • New features that you would like to add now in this project.
I felt very comfortable after the interview. I answered every question very confident and even discussion went really good. Preparation i had for amazon helped me a lot here.

Next Day, I got a call from external recruiter. She said feedback was excellent and they want to have a panel interview with team in Dallas,TX. I have forwarded her travel details along with available date.

This is my first ever panel interview and i was really scared as i dint knew how to handle this. A day later, i got another email which had list of interviewer names and a quick google showed them as people with 10-15 yrs experience in same job.

I went to dallas….

Onsite Team Panel Interview 1(4 Team Members) : 1 HR

One Lady took me into conference room and three others have joined us in few minutes. This is basically a support role and they were asking many questions on tools to debug
  • How do you react when a bug arrives you or what steps do you follow to fix a bug ?
  • what all tools did you used for bug fix.
  • previous experience
  • previous projects
  • production bugs in previous project and how you solved them
  • Have you ever used cloud instances or virtual machines
At the end of an hour, everyone was tired by asking so many questions but i was still responding with enough patience and proper eye contact. One of the person was not showing much interest from start, so i cracked a joke and he laughed at it. Later, I maintained little more eye contact towards him which made him ask few more questions.

At the end of hour.. we had their team director join the panel

Onsite Team Panel Interview 2 (4 Team members + director) : 1 HR

This guy was really cool and his first question made everyone laugh which brought a lot of positive energy into room.
  1. why is manhole round
  2. behavioral or team-management questions 
It went almost for another hour and i left back to motel later. From the start, i was never interested in joining this company. Even before coming to on-site Dallas interview, i thought it more of like a free trip to meet my friends rather than a onsite interview. 

I wasn't even confident after the interview but a week later i got a call from external recruiter that team has gave excellent review. It totally took me by surprise, A week later microsoft recruiter gave me same news in email but this time she says “Team will deliberate and take a decision soon but so far review is good and hear good news before holidays(thanksgiving)”. She called me a day before thanksgiving and described about offer.

End Result : Got an Offer


------------------------------------------------------------------------------------------------------------------------

Positives:

  • Be confident
  • Be patient and answer their questions very carefully

Resources








Saturday, January 10, 2015

Scala Tutorial

What is Scala ?
  • Functional Programming (treats computation as the evaluation of mathematical functions and avoids state and mutable data)
  • Pure OO
  • Supports Java Library / Framework Ecosystem

Why Scala ?

  • It cuts down on boilerplate, so programmers can concentrate on the logic of their problems.
    To get data from url : Source.fromURL(url, "UTF-8").mkString
  • It protects existing investments by running on the Java Virtual Machine and interoperating seamlessly with Java.

Functional Programming

apply : Function is an Object with an apply method
Object Hello {
def apply(s:String) = "Hello" + world}
println (Hello("world"))
named : normal way of creating functions
def sum(x:Int,y:Int):Int =
{
  x+y
}
literal : Functions can be assigned to variable
val add_one = (x:Int) => x+1

add_one(3) // 4
// Turning existing functions into literals

val p = print _  // _ is something like we dont actually whatsoever value is
p("Hi")
// if you want to restrict your params 

val add_one:(Int) => Int = (x) => x + 1  // defines that it takes int and returns Int 
Partial functions : not all parameters info is provided
val add_one = sum(1,_:Int)
add_one(5) // gives 6
vall addition = (sum _).curried // applies arguments in a sequence
addition(5)(1)
Higher-order functions : functions that take functions as parameter
// twice(f, 7) = f(f(7)) = (7 + 3) + 3.
def f(x):
    return x + 3
 def twice(function, x):
    return function(function(x))
 print(twice(f, 7))
Pattern Matching :
def matchTest(x: Int): String = x match {
    case 1 => "one"
    case 2 => "two"
    case _ => "many"
  }

whats the big deal ? . we can do the same with switch in java 

http://docs.oracle.com/javase/tutorial/java/nutsandbolts/switch.html
Match on Class Instances
var play = sport("cricket")

play match{
  case sport("football") => println("im playing football")
  case sport("cricket") => println("im playing cricket")
  case sport(_) => println("im unsure")
}
Match on Regular Expressions
// val vs var

val cricket ="^c.*"
val football = "^f.*"

val sport = "cricket"

sport match{
 case cricket : pl("playing cricket")
 case football : pl("playing football")
 case _ : pl ("xxx")
}
Scala Closures


Object Oriented Programming

Object : object in scala is like the static portion of class in java.
Generics :
class Stack[T]
{
private val list = new List [T]
def pop : T ={ }
def peek : T = { }
}
Covariant +T   (Accepts any type that is sub class of T)
Contravariant -T (Accepts any type that is super class of T)

Apple Pay in Swift

Apple Pay lets you use iPhone 6 and Apple Watch to pay in stores and apps in an easy, secure, and private way."

Below method would be quick start for using this functionality in iOS8+ devices

/*  
Method to make apple pay
*/
func applePaymentProcess(){

if(PKPaymentAuthorizationViewController.canMakePayments()){

let pkRequest = PKPaymentRequest();
pkRequest.countryCode = "US"
pkRequest.currencyCode = "USD"
pkRequest.supportedNetworks = [PKPaymentNetworkAmex,PKPaymentNetworkMasterCard,PKPaymentNetworkVisa]
pkRequest.merchantCapabilities = PKMerchantCapability.CapabilityEMV
// pkRequest.merchantIdentifier =
let item1 = PKPaymentSummaryItem.init(label:"motoX", amount:34.5)
let item2 = PKPaymentSummaryItem.init(label:"motoG", amount:30.5)
pkRequest.paymentSummaryItems = [item1,item2]
var paymentPane = PKPaymentAuthorizationViewController.init(paymentRequest:pkRequest)
}
}

Git Hub Project : https://github.com/prashanthmadi/Apply-Pay-Sample-App---Swift