Amazon Interview | Set 27
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的更多相关文章
- amazon interview
I'll be sitting for an Amazon interview in 3 months. Which website should I use to practice: SPOJ, H ...
- 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 ...
- Amazon behavior question
Amazon onsite behavior question[一亩三分地论坛面经版] - Powered by Discuz! http://www.1point3acres.com/bbs/thr ...
- 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. ...
- Google, Facebook, Amazon and Microsoft Salaries
https://blog.step.com/2016/04/08/an-open-source-project-for-tech-salaries/ Step.com Crowdsource your ...
- Select the best path in a matrix
Amazon interview question: Given a 2-dimensional array with arbitrary sizes and contains random posi ...
- 最新的hosts
# Copyright (c) 2014-2016, racaljk.# https://github.com/racaljk/hosts# Last updated: 2016-07-03 # Th ...
- hosts代理
hosts代理文件:C:\Windows\System32\drivers\etc\HOSTS 内容如下: # Copyright (c) -, racaljk. # https://github.c ...
- ubuntu下配置hosts
由于Chrome浏览器访问问题,需要配置hosts. 在Ubuntu系统下,需要修改/etc/hosts文件,修改完之后要重启网络.具体过程如下:1.修改hostssudo vi /etc/hosts ...
随机推荐
- <程序员从入门到精通> -- How
定位 自己才是职业生涯的管理者,想清楚自己的发展路径: 远期的理想是什么?近期的规划是什么?今日的任务和功课又是什么? 今日之任务或功课哪些有助于近期之规划的实现,而近期之规划是否有利于远期之理想? ...
- js动态加载css和js
之前写了一个工具类点此链接里面含有这段代码,感觉用处挺多,特意提出来 var loadUtil = { /* * 方法说明:[动态加载js文件css文件] * 使用方法:loadUtil.loadjs ...
- 一步步开发自己的博客 .NET版(5、Lucenne.Net 和 必应站内搜索)
前言 这次开发的博客主要功能或特点: 第一:可以兼容各终端,特别是手机端. 第二:到时会用到大量html5,炫啊. 第三:导入博客园的精华文章,并做分类.(不要封我) 第四:做 ...
- height:100% 布局
常常会碰到需要填满整个浏览器,并且自适应高度的需求.首先肯定会想到给容器设定height:100%,但是会没有效果.原因是body没有高度,所以百分比无法生效. 解决方案:给html,body,标签都 ...
- 在 Ubuntu 14.10 中借用 Windows 的字体
在前一篇随笔中,我详细讨论了字体的分类及用途,也以 Fedora 20 为例,展示了字体配置的思路和方法.我在配置 Fedora 20 系统字体的时候,采用的是一种釜底抽薪的方法,完全抛开了系统原有的 ...
- Nginx学习笔记(二) Nginx--connection&request
Nginx--connection&request 在Nginx中,主要包括了连接与处理两部分. connection 在src/core文件夹下包含有connection的源文件,Ngx_c ...
- wx.onMenuShareTimeline使用注意事项
我在开发测试过程中,发现使用wx.onMenuShareTimeline无效果,没有显示我定义的图片.title和链接,经过调试发现原因如下: 1.图片大小要大于300pix才能显示 2.这个方法必须 ...
- ABP源码分析十七:DTO 自动校验的实现
对传给Application service对象中的方法的DTO参数,ABP都会在方法真正执行前自动完成validation(根据标注到DTO对象中的validate规则). ABP是如何做到的? 思 ...
- Android笔记——AsyncTask介绍
AsyncTask和Handler对比 1 ) AsyncTask实现的原理,和适用的优缺点 AsyncTask,是android提供的轻量级的异步类,可以直接继承AsyncTask,在类中实现异步操 ...
- 如何在博客中使用SublimeText风格的代码高亮样式
因为觉得博客园自带的代码高亮样式很单一,不符合作为前端的我的审美习惯,于是下定决心要想办法折腾出一个方法来应用上另外一套代码高亮样式. 虽然探索的过程是很痛苦的,但最后还是成功了,但也不枉付出的那些努 ...