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. c# 基础 object ,new操作符,类型转换

    参考页面: http://www.yuanjiaocheng.net/webapi/config-webapi.html http://www.yuanjiaocheng.net/webapi/web ...

  2. celery使用的一些小坑和技巧(非从无到有的过程)

    纯粹是记录一下自己在刚开始使用的时候遇到的一些坑,以及自己是怎样通过配合redis来解决问题的.文章分为三个部分,一是怎样跑起来,并且怎样监控相关的队列和任务:二是遇到的几个坑:三是给一些自己配合re ...

  3. JQuery的基础和应用

    <参考文档>   1.什么是?    DOM的作用:提供了一种动态的操作HTML元素的方法.    jQuery是一个优秀的js库.用来操作HTML元素的工具.    jQuery和DOM ...

  4. BPM配置故事之案例2-文本默认值

    Boss感觉方便了很多,然而采购部采购员阿海却还是有点意见,他跑来找小明. 阿海:现在申请都是我在提交,申请人和申请部门能不能不要每次都要填写啊,好麻烦的. 小明:没问题,这个简单. 小明在表单中把申 ...

  5. Android SDK 与API版本对应关系

    Android SDK版本号 与 API Level 对应关系如下表: Code name Version API level   (no code name) 1.0 API level 1   ( ...

  6. 服务治理要先于SOA

      讲在前面的话: 若企业缺乏对服务变更的控制和规则,那么一个服务在经过几个项目之后,就很有可能被随意更改成多个版本,将来变成什么样更是无法预测.久而久之,降低了服务重用的可能性,提高了服务利用的成本 ...

  7. MVC5在Mono上的各种坑

    买了Macbook后,各种事情的纠缠,都没好好地用过OSX系统. 果断的装上了xcode和mono,还有monodevelop. 然后把项目移植到mono上运行,各种问题. 然后第一个问题来了 权限不 ...

  8. Javascript实践技巧

    最近辞职了,准备北上.期待有个好结果~   本文以<Javascript高级程序设计>为基础,结合自身经验来总结下Javascript实际工作方面的知识.   一.可维护性 1.代码约定 ...

  9. 前端自学路线之js篇

    上一篇我们讲了前端切图的学习路线,不知大家有没有收获.今天来聊聊前端工程师的核心技能之——JavaScript.js这门语言看似简单,但要做到入门.熟练以至于架构的程度,还是有一段路要走的,今天就来聊 ...

  10. .Net 4.5可执行程序OutOfMemory

    原创文章转载请注明出处:@协思, http://zeeman.cnblogs.com   产线上新部署的服务,发生几次无故停止的情况,通过系统事件看到是这样:   这个服务缓存了大量的数据,内存占用比 ...