Amazon Interview | Set 27

Hi, I was recently interviewed for SDE1 position for Amazon and got selected. I have 1.5 year experience in java. Geeksforgeeks helped me lot. I am very thankful to Geeksforgeeks team. Following were interview questions-

Two telephonic rounds followed by 5 F2F interviews.

Round 1 (Telephonic):

1. There is a dictionary already implemented. Write a method, which takes input String without space, to prints all subsets of the input string which is present in dictionary.

Example: Dictionary – a*
………….Input- aaabaa
………….Output- a,a,a,aa,aa,aaa,a,a,aa

2. There is a dictionary already implemented. Write a method , which takes input String without space, to replace the characters from the strings which are not present in dictionary with –

Example: Dictionary – a*
………….Input- aaabaa
………….Output- aaa_aa

Interviewer was cool. Did not code properly (lots of bugs were in code), but gave good approach for first question. For second question solution sent in a mail.

Round 2 (Telephonic):

1. Write a program to remove duplicates from array of prime numbers.

2. Write a program to return nearest elements from a binary search tree for input element.

This round was very good. Interviewer was very happy with my approach for both questions. Code did not have big bug.

Round 1 (F2F- Problem Solving and coding):
1. Tell me about yourself.
2. Write a program to find top 10 elements on an array of integers.
Don’t remember much. Questions were easy. This round was very good. Interviewer was happy with solution.
3. Write a program to calculate a^b and store it in floating point representation.

Round 2 (F2F- Computer Fundamental):
1. Tell me about experience in past job.
2. OOPS concepts- Polymorphism, Inheritance, Encapsulation, Abstraction.
3. Aggregation and Composition.
4. Design patterns which you have implemented.
5. Write code to implement Singleton design pattern.
6. Design a system to implement options in Pack of cards.
7. Difference between Windows and Unix.
8. Threads, Synchronization, Deadlock.
9. Other subjects which you studied in your academics.
10. Most challenging work you ever faced.
11. Discussed about current project, role.
This round was fair enough. I was not able to discuss questions on subjects which I studied in academics.

Round 3 (F2F- Data Structures and Algorithms):
1. Tell me about yourself.
2. There is a 2d array. Write code to find the path with maximum sum. You can only traverse i+1 or j+1.if i is row number and j is column number.
I solved it using dynamic programming
3. In a binary tree find the least common ancestor for two nodes. (Write code)
4. Similar to 3rd question. Write a program to find least common ancestor in binary search tree.
This round was very good. Finished it only 40 mins.

Round 4 (F2F- Managerial round):
1. Tell me about yourself.
2. Copy Linked list with orbit pointer.
3. Write a code to find top hundred elements in a data set which cannot be loaded in RAM.
4. Typical parenthesis checking problem.
5. Most challenging work you ever faced.
6. What will do if you get task which is ambiguous.
7. At what extend you will be frustrated if you always get ambiguous problems.
8. How many members in your team in current organization. What’s your role? Questions on current project.

Interviewer was very cool and friendly.

Round 5 (F2F- Bar raiser round):
1. Tell me about yourself.
2. Discussed about current project.
3. Write a program to find number of inversions in an array.
Example- Array 2, 5, 3, 1,10
Inversions (2,1) , (5,1), (3,1), (5,3)
Answer will be – 4
Gave solution of complexity o(nlogn) . Interviewer gave me hint for that.
Hint- Divide and conquer approach.
He asked me to write code which doesn’t have any bug.

This article is compiled by Neha Gupta. Many Many congratulations to Neha. If you like GeeksforGeeks and would like to contribute, you can also write an article and mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Amazon Interview | Set 27的更多相关文章

  1. amazon interview

    I'll be sitting for an Amazon interview in 3 months. Which website should I use to practice: SPOJ, H ...

  2. Amazon Interview Question: Design an OO parking lot

    Design an OO parking lot. What classes and functions will it have. It should say, full, empty and al ...

  3. Amazon behavior question

    Amazon onsite behavior question[一亩三分地论坛面经版] - Powered by Discuz! http://www.1point3acres.com/bbs/thr ...

  4. Top 25 Most Frequently Asked Interview Core Java Interview Questions And Answers

    We are sharing 25 java interview questions , these questions are frequently asked by the recruiters. ...

  5. Google, Facebook, Amazon and Microsoft Salaries

    https://blog.step.com/2016/04/08/an-open-source-project-for-tech-salaries/ Step.com Crowdsource your ...

  6. Select the best path in a matrix

    Amazon interview question: Given a 2-dimensional array with arbitrary sizes and contains random posi ...

  7. 最新的hosts

    # Copyright (c) 2014-2016, racaljk.# https://github.com/racaljk/hosts# Last updated: 2016-07-03 # Th ...

  8. hosts代理

    hosts代理文件:C:\Windows\System32\drivers\etc\HOSTS 内容如下: # Copyright (c) -, racaljk. # https://github.c ...

  9. ubuntu下配置hosts

    由于Chrome浏览器访问问题,需要配置hosts. 在Ubuntu系统下,需要修改/etc/hosts文件,修改完之后要重启网络.具体过程如下:1.修改hostssudo vi /etc/hosts ...

随机推荐

  1. Discuz论坛黑链清理教程

    本人亲测有效,原创文章哦~~~ 论坛黑链非常的麻烦,如果你的论坛有黑链,那么对不起,百度收录了你的黑链,不会自动删除,需要你手动去清理. 什么是黑链 黑链,顾名思义,就是一些赌博网站的外链,这些黑链相 ...

  2. 从Vue.js窥探前端行业

    近年来前端开发趋势 1.旧浏览器逐渐淘汰,移动端需求增加: 旧浏览器主要指的是IE6-IE8,它是不支持ES5特性的:IE9+.chrome.sarafi.firefox对ES5是完全支持的,移动端大 ...

  3. Configure a VLAN on top of a team with NetworkManager (nmcli) in RHEL7

    SOLUTION VERIFIED September 13 2016 KB1248793 Environment Red Hat Enterprise Linux 7 NetworkManager ...

  4. C# Entity Framework并发处理

    原网站:C# Entity Framework并发处理 在软件开发过程中,并发控制是确保及时纠正由并发操作导致的错误的一种机制.从 ADO.NET 到 LINQ to SQL 再到如今的 ADO.NE ...

  5. js闭包for循环总是只执行最后一个值得解决方法

    <style> li{ list-style: none;width:40px;height: 40px;text-align:center;line-height: 40px;curso ...

  6. openresty 前端开发入门五之Mysql篇

    openresty 前端开发入门五之Mysql篇 这章主要演示怎么通过lua连接mysql,并根据用户输入的name从mysql获取数据,并返回给用户 操作mysql主要用到了lua-resty-my ...

  7. Storm介绍(一)

    作者:Jack47 PS:如果喜欢我写的文章,欢迎关注我的微信公众账号程序员杰克,两边的文章会同步,也可以添加我的RSS订阅源. 内容简介 本文是Storm系列之一,介绍了Storm的起源,Storm ...

  8. click事件的累加绑定,绑定一次点击事件,执行多次

    最近做项目为一个添加按钮绑定点击事件,很简单的一个事情,于是我按照通常做法找到元素,使用jquery的on()方法为元素绑定了点击事件,点击同时发送请求.完成后看效果,第一次点击没有问题.再一次点击后 ...

  9. 布里斯班Twilight Bay Run半程马拉松

    自从8月3日跑了半马以后,又一鼓作气报了11月份的西昌马拉松.与第一次马拉松的只求完赛目标不同,第二次当然想取得一个更好的成绩.所以8月份练的比较猛,基本上是练2.3天休息一天,周么还要拉个长于21公 ...

  10. 在rem布局下使用背景图片以及sprite

    现在移动端页面用rem布局已经是一大流派了,成熟的框架如淘宝的flexiable.js,以及我的好友@墨尘写的更轻量级的hotcss.用rem作单位使得元素能够自适应后,还有一块需要关注的,那就是背景 ...