Yelp phone screening interview

During my interview with Yelp today I was asked the following questions:

  1. Why would you like to work for Yelp?
  2. How many bits can be represented by a single octal digit? Answer: 3 Source
  3. What should be the sizeof(int) on a 64 bit machine?
  4. How many bits can be represented by a single octal digit?
  5. On which data structure it would be faster to perform binary search linked list or sorted array?
  6. What is the worst case time of inserting element in the beginning linked list?
  7. What is the number for the kill signal in unix?
  8. How does a domain name map to a server on the internet?
  9. What does ssl stand for?
  10. Something about finding all references of a word or function under linux. I said use grep command and it seemed to be right.
  11. Something about mutable in Python. I don’t know Python so I didn’t answer it.

What happens when you type in a URL in browser?

In a simplified way:

  1. browser checks cache; if requested object is in cache and is fresh, skip to #9
  2. browser asks OS for server’s IP address
  3. OS makes a DNS lookup and replies the IP address to the browser
  4. browser opens a TCP connection to server (this step is much more complex with HTTPS)
  5. browser sends the HTTP request through TCP connection
  6. browser receives HTTP response and may close the TCP connection, or reuse it for another request
  7. browser checks if the response is a redirect (3xx result status codes), authorization request (401), error (4xx and 5xx), etc.; these are handled differently from normal responses (2xx)
  8. if cacheable, response is stored in cache
  9. browser decodes response (e.g. if it’s gzipped)
  10. browser determines what to do with response (e.g. is it a HTML page, is it an image, is it a sound clip?)
  11. browser renders response, or offers a download dialog for unrecognized types

You can  get more information here.

What does TCP/IP stand for?

TCP/IP (Transmission Control Protocol/Internet Protocol) is the basic communication language or protocol of the Internet. It can also be used as a communications protocol in a private network (either an intranet or an extranet). When you are set up with direct access to the Internet, your computer is provided with a copy of the TCP/IP program just as every other computer that you may send messages to or get information from also has a copy of TCP/IP.

What does UDP stand for?

UDP (User Datagram Protocol) is an alternative communications protocol to Transmission Control Protocol (TCP) used primarily for establishing low-latency and loss tolerating connections between applications on the Internet. Both UDP and TCP run on top of the Internet Protocol (IP) and are sometimes referred to as UDP/IP or TCP/IP. Both protocols send short packets of data, called datagrams.

Amazon Web Services (Amazon AWS)

  • EC2 – Amazon Elastic Compute Cloud (EC2) is a central part of’s cloud computing platform, Amazon Web Services (AWS). EC2 allows users to rent virtual computers on which to run their own computer applications.
  • S3 – Amazon S3 (Simple Storage Service) is an online file storage web service offered by Amazon Web Services. Amazon S3 provides storage through web services interfaces (REST, SOAP, and BitTorrent).
  • VPC – Amazon Virtual Private Cloud (VPC) is a commercial cloud computing service that provides users a virtual private cloud, by “provision[ing] a logically isolated section of Amazon Web Services (AWS) Cloud”.
  • RDS – Amazon Relational Database Service (Amazon RDS) is a web service that makes it easier to set up, operate, and scale a relational database in the cloud. It provides cost-efficient, resizeable capacity for an industry-standard relational database and manages common database administration tasks.
  • IAM – Amazon Web Services (AWS) Identity and Access Management (IAM) is a directory service designed for tracking system users and providing ways of keeping track of information about how they get authenticated.
  • Route 53 – Amazon Route 53 (Route 53) is part of’s cloud computing platform, Amazon Web Services (AWS). Route 53 provides scalable and highly available Domain Name System (DNS). The name (Route 53) is a reference to TCP or UDP port 53, where DNS server requests are addressed.
  • CloudFront – Amazon CloudFront is a content delivery network (CDN) offered by Amazon Web Services. CloudFront operates on a pay-as-you-go basis.
  • CloudWatch – Amazon CloudWatch is a monitoring service for AWS cloud resources and the applications you run on AWS. You can use Amazon CloudWatch to collect and track metrics, collect and monitor log files, and set alarms. Amazon CloudWatch can monitor AWS resources such as Amazon EC2 instances, Amazon DynamoDB tables, and Amazon RDS DB instances, as well as custom metrics generated by your applications and services, and any log files your applications generate.
  • CloudFormation – AWS CloudFormation is a service that helps you model and set up your Amazon Web Services resources so that you can spend less time managing those resources and more time focusing on your applications that run in AWS. You create a template that describes all the AWS resources that you want (like Amazon EC2 instances or Amazon RDS DB instances), and AWS CloudFormation takes care of provisioning and configuring those resources for you. You don’t need to individually create and configure AWS resources and figure out what’s dependent on what; AWS CloudFormation handles all of that.
  • Elastic Beanstalk – AWS Elastic Beanstalk is a PaaS (Platform as a Service) service from Amazon Web Services that allows users to create applications and push them to a definable set of AWS services, including Amazon EC2, Amazon S3, Amazon Simple Notification Service (SNS), Amazon CloudWatch, auto scaling, and elastic load balancers.
  • OpsWorks – AWS OpsWorks is an application management service that makes it easy for DevOps users to model & manage the entire application.
  • DynamoDB – Amazon DynamoDB is a fully managed proprietary NoSQL database service that is offered by as part of the Amazon Web Services portfolio. DynamoDB exposes a similar data model and derives its name from Dynamo, but has a different underlying implementation.

HTTP Verbs

  • GET is to get representation of the resource
  • PUT is to create or update a resource
  • POST is it to create a resource
  • DELETE is to delete a resource
  • HEAD is very similar to GET and it is mainly used to check if the resource exist.
  • PATCH is used to modify a part of the resource
  • OPTIONS allows the client to determine the options and/or requirements associated with a resource