I recently interviewed at Amazon. It was obviously exciting to get the call. Not only is Amazon one of the top companies in the world by market cap, it is arguably one of the most innovative. It competes in multiple sectors from e-commerce, cloud computing, and even the grocery industry. Gone are the days when this titan was a small online bookstore operating out of Jeff Bezo’s garage.
The growth of its octopus-like tentacles into various sectors has generated intensive scrutiny, both in the court of public opinion and the courtroom itself. Congress recently grilled the “Big Tech” CEOs on Capitol Hill. Regulatory scrutiny and public demands for more oversight of these tech titans is stronger than it has ever been. Which is likely why Amazon is seeking to expand their Legal and Compliance teams.
Given my legal background, I did not interview for one of the technical positions most people hear about when they think of Amazon. The brogrammers, or “ Amholes” as my native Seattleites moniker them as, are like the star traders of the finance world. They drive business and transform ideas into reality. Legal and compliance considerations often pose barriers or complexities to their initiatives. When computer programmers or traders operate in a high-pressured environment where the bottom line means everything, it is understandable that certain employees may pursue profit at all costs. The ends justify the means. Compliance be damned. What I did not expect from my Amazon interview was the sense that Compliance at Amazon was somehow in on the racket.
Before diving into the interview details, it is important to keep in mind allegations surrounding certain Amazon business practices. Allegations of anticompetitive conduct are nothing new to “Big Tech” companies, and I have written about them in the past. In Amazon’s case, a recent WSJ investigative story described how “ Amazon met with startups about investing, then launched competing products.” This Standard Oil style of corporate espionage took advantage of newer and weaker market entrants by leveraging Amazon’s size and scale, both as an e-commerce platform and technology developer.
In some cases, Amazon’s decision to launch a competing product devastated the business in which it invested. In other cases, it met with startups about potential takeovers, sought to understand how their technology works, then declined to invest and later introduced similar Amazon-branded products, according to some of the entrepreneurs and investors.
More than two dozen entrepreneurs, investors, and deal advisors served as sources for the story. The WSJ has also previously reported that Amazon allegedly used “data about individual third-party sellers on its site to create competing products.” The way Amazon leverages its e-commerce platform to gain competitive advantages with various technologies (Alexa, Echo, etc.), is similar to how Rockefeller leveraged his control over railroads to gain competitive advantages in freight costs for his oil. Amazon is merely replicating how robber barons of the past operated. Instead of railroads, they use their vast e-commerce platform, which allows them to connect to and enter almost any industry.
When it comes to interviewing candidates to join its ranks of almost 850,000 employees, Amazon employs the “ STAR Method.” This behavioral interviewing technique is not novel by any means. Many companies use it, but few execute it quite like Amazon. By the time I was finished with my final interview — a six round marathon — it felt like I had been pressured for hours to divulge confidential information about my current employer.
My Amazon interviewers applied this pressure via the STAR Method. STAR stands for: (i) Situation; (ii) Task; (iii) Action; and (iv) Result. The interviewer prompts the interviewee to apply it by asking a scenario-based question, which could include the following:
You get the idea. In response to these questions, the onus is on you — the interviewee — to apply the STAR method by doing the following:
#technology #corporate #career-advice #amazon #careers
Image courtesy of the author
Landing a job at Amazon is a dream for many developers around the globe. Amazon is one of the largest companies in the world, with a workforce over half a million strong. Amazon is hiring at a rapid rate with a unique hiring process that emphasizes company culture and leadership principles. Today, I will walk through everything you need to crack an Amazon interview, including coding questions and a step-by-step preparation guide.
Today we will go over the following:
Image courtesy of the author
You are given an array of positive numbers from
n, such that all numbers from
n are present except one number
x. You have to find
def find_missing(input): # calculate sum of all elements # in input list sum_of_elements = sum(input) # There is exactly 1 number missing n = len(input) + 1 actual_sum = (n * ( n + 1 ) ) / 2 return actual_sum - sum_of_elements def test(n): missing_element = random.randint(1, n) v =  for i in range(1, n): if i != missing_element: v.append(i) actual_missing = find_missing(v) print("Expected Missing = ", missing_element, " Actual Missing = ", actual_missing) assert missing_element == actual_missing def main(): for n in range(1, 10): test(1000000) main()
Runtime Complexity: Linear, O(n)
Memory Complexity: Constant, O(1)
A naive solution is to simply search for every integer between
n in the input array, stopping the search as soon as there is a missing number. But we can do better. Here is a linear, O(n) solution that uses the arithmetic series sum formula. Here are the steps to find the missing number:
sum_of_elementsof all the numbers in the array. This would require a linear scan, O(n).
nnumbers using the arithmetic series sum formula
expected_sum - sum_of_elements, is the missing number in the array.
Given an array of integers and a value, determine if there are any two integers in the array whose sum is equal to the given value. Return
true if the sum exists and return
def find_sum_of_two(A, val): found_values = set() for a in A: if val - a in found_values: return True found_values.add(a) return False v = [5, 7, 1, 2, 8, 4, 3] test = [3, 20, 1, 2, 7] for i in range(len(test)): output = find_sum_of_two(v, test[i]) print("find_sum_of_two(v, " + str(test[i]) + ") = " + str(output))
Runtime Complexity: Linear, O(n)
Memory Complexity: Linear, O(n)
You can use the following algorithm to find a pair that add up to the target (say,
scan, for every element
ein the array, we check if
val - eis present in the hash set, i.e.,
val - eis already visited.
val - eis found in the hash set, it means there is a pair (
val - e) in the array whose sum is equal to the given
def merge_sorted(head1, head2): # if both lists are empty then merged list is also empty # if one of the lists is empty then other is the merged list if head1 == None: return head2 elif head2 == None: return head1 mergedHead = None; if head1.data <= head2.data: mergedHead = head1 head1 = head1.next else: mergedHead = head2 head2 = head2.next mergedTail = mergedHead while head1 != None and head2 != None: temp = None if head1.data <= head2.data: temp = head1 head1 = head1.next else: temp = head2 head2 = head2.next mergedTail.next = temp mergedTail = temp if head1 != None: mergedTail.next = head1 elif head2 != None: mergedTail.next = head2 return mergedHead array1 = [2, 3, 5, 6] array2 = [1, 4, 10] list_head1 = create_linked_list(array1) print("Original1:") display (list_head1) list_head2 = create_linked_list(array2) print("\nOriginal2:") display (list_head2) new_head = merge_sorted(list_head1, list_head2) print("\nMerged:") display(new_head)
Runtime Complexity: Linear, O(m+n) where m and n are lengths of both linked lists
Memory Complexity: Constant, O(1)
Maintain a head and a tail pointer on the merged linked list. Then choose the head of the merged linked list by comparing the first node of both linked lists. For all subsequent nodes in both lists, you choose the smaller current node, link it to the tail of the merged list, and move the current pointer of that list one step forward.
Continue this while there are some remaining elements in both the lists. If there are still some elements in only one of the lists, you link this remaining list to the tail of the merged list. Initially, the merged linked list is
Compare the value of the first two nodes and make the node with the smaller value the head node of the merged linked list. In this example, it is
head1. Since it’s the first and only node in the merged list, it will also be the tail. Then move
head1 one step forward.
You are given a linked list where the node has two pointers. The first is the regular
next pointer. The second pointer is called
def deep_copy_arbitrary_pointer(head): if head == None: return None current = head; new_head = None new_prev = None ht = dict() # create copy of the linked list, recording the corresponding # nodes in hashmap without updating arbitrary pointer while current != None: new_node = LinkedListNode(current.data) # copy the old arbitrary pointer in the new node new_node.arbitrary = current.arbitrary; if new_prev != None: new_prev.next = new_node else: new_head = new_node ht[current] = new_node new_prev = new_node current = current.next new_current = new_head # updating arbitrary pointer while new_current != None: if new_current.arbitrary != None: node = ht[new_current.arbitrary] new_current.arbitrary = node new_current = new_current.next return new_head def create_linked_list_with_arb_pointers(length): head = create_random_list(length) v =  temp = head while temp != None: v.append(temp) temp = temp.next for i in range(0, len(v)): j = random.randint(0, len(v) - 1) p = random.randint(0, 100) if p < 75: v[i].arbitrary = v[j] return head
Runtime Complexity: Linear, O(n)
Memory Complexity: Linear, O(n)
This approach uses a map to track arbitrary nodes pointed by the original list. You will create a deep copy of the original linked list (say
list_orig) in two passes.
arbitrary_pointerin the new list. Also, keep updating the map with entries where the key is the address to the old node and the value is the address of the new node.
# Using two queues def level_order_traversal_1(root): if root == None: return queues = [deque(), deque()] current_queue = queues next_queue = queues current_queue.append(root) level_number = 0 while current_queue: temp = current_queue.popleft() print(str(temp.data) , end = " ") if temp.left != None: next_queue.append(temp.left) if temp.right != None: next_queue.append(temp.right) if not current_queue: print() level_number += 1 current_queue = queues[level_number % 2] next_queue = queues[(level_number + 1) % 2] print() arr = [100,50,200,25,75,350] root = create_BST(arr) print("InOrder Traversal:", end = "") display_inorder(root) print("\nLevel Order Traversal:\n", end = "") level_order_traversal_1(root)
Runtime Complexity: Linear, O(n)
Memory Complexity: Linear, O(n)
Here you are using two queues:
next_queue. You push the nodes in both queues alternately based on the current level number.
You’ll dequeue nodes from the
current_queue, print the node’s data, and enqueue the node’s children to the
next_queue. Once the
current_queue becomes empty, you have processed all nodes for the current
level_number. To indicate the
new level, print a line break (
\n), swap the two queues, and continue with the above-mentioned logic.
After printing the leaf nodes from the
next_queue. Since the
current_queue would be empty, you can terminate the loop.
#programming #interview #amazon #job-interview #coding-interviews
The Amazon business analyst job is a mix of technical data interpretation and business acumen. A successful business analyst will move into a career path of product management, analytics management, or business intelligence, all of which require depth as well as width of knowledge.
The Amazon interview process is extremely consistent across the different teams. Once your resume is shortlisted, the interview starts with a recruiter screening or phone screen with a hiring manager. Then if selected in those initial rounds, you are invited for an interview loop of around 4–5 interviews in the same day. All of the interviews are based on Amazon’s 14 leadership principles to test your competency and may include technical interview questions.
Overall the breakdown in terms of focus in preparation should be mainly on leadership principles, a little bit on database system design, and lastly on actually coding, SQL queries, and product and business cases.
Check out a mock interview of an Amazon business case question.
Based on the level (L3/L4/L5), you will have 4–5 rounds in person. Out of these, there will be a couple of technical rounds and a couple of behavioral rounds. Behavioral rounds will be mostly to judge you on the notorious leadership principles of Amazon.
For Amazon’s leadership behavioral competency interview, the exact phrasing of the question may be different but the central idea remains the same between each leadership principle.
For each leadership principle, remember to craft a story around how you exemplified each one of these principles. For example:
The interviewer will never state that they’re asking you a leadership principles type question. Yet know exactly how to craft a story that leads to one of the fourteen principles. It’s basically the elephant in the room!
#interview-query #amazon-business-analyst #amazon-interview #interview-questions #business-analyst
Android Interview Questions and Answers from Beginner to Advanced level
DataFlair is committed to provide you all the resources to make you an android professional. We started with android tutorials along with practicals, then we published Real-time android projects along with source code. Now, we come up with frequently asked android interview questions, which will help you in showing expertise in your next interview.
Android – one of the hottest technologies, which is having a bright future. Get ready to crack your next interview with the following android interview questions. These interview questions start with basic and cover deep concepts along with advanced topics.
1. What is Android?
Android is an open-source mobile operating system that is based on the modified versions of Linux kernel. Though it was mainly designed for smartphones, now it is being used for Tablets, Televisions, Smartwatches, and other Android wearables.
2. Who is the inventor of Android Technology?
The inventors of Android Technology are- Andry Rubin, Nick Sears, and Rich Miner.
3. What is the latest version of Android?
The latest version of Android is Android 10.0, known as Android Q. The upcoming major Android release is Android 11, which is the 18th version of Android. [Note: Keep checking the versions, it is as of June 2020.]
4. How many Android versions can you recall right now?
Till now, there are 17 versions of Android, which have their names in alphabetical order. The 18th version of Android is also going to come later this year. The versions of Android are here:
5. Explain the Android Architecture with its components.
This is a popular android developer interview question
Android Architecture consists of 5 components that are-
a. Linux Kernel: It is the foundation of the Android Architecture that resides at the lowest level. It provides the level of abstraction for hardware devices and upper layer components. Linux Kernel also provides various important hardware drivers that act as software interfaces for hardwares like camera, bluetooth, etc.
b. Native Libraries: These are the libraries for Android that are written in C/C++. These libraries are useful to build many core services like ART and HAL. It provides support for core features.
c. Android Runtime: It is an Android Runtime Environment. Android Operating System uses it during the execution of the app. It performs the translation of the application bytecode into the native instructions. The runtime environment of the device then executes these native instructions.
d. Application Framework: Application Framework provides many java classes and interfaces for app development. And it also provides various high-level services. This complete Application framework makes use of Java.
e. Applications: This is the topmost layer of Android Architecture. It provides applications for the end-user, so they can use the android device and compute the tasks.
6. What are the services that the Application framework provides?
The Android application framework has the following key services-
a. Activity Manager: It uses testing and debugging methods.
b. Content provider: It provides the data from application to other layers.
c. Resource Manager: This provides users access to resources.
d. Notification Manager: This gives notification to the users regarding actions taking place in the background.
e. View System: It is the base class for widgets, and it is also responsible for event handling.
7. What are the important features of Linux Kernel?
The important features of the Linux Kernel are as follows:
a. Power Management: Linux Kernel does power management to enhance and improve the battery life of the device.
b. Memory Management: It is useful for the maximum utilization of the available memory of the device.
c. Device Management: It includes managing all the hardware device drivers. It maximizes the utilization of the available resources.
d. Security: It ensures that no application has any such permission that it affects any other application in order to maintain security.
e. Multi-tasking: Multi-tasking provides the users the ease of doing multiple tasks at the same time.
8. What are the building blocks of an Android Application?
This is a popular android interview question for freshers.
The main components of any Android application are- Activity, Services, Content Provider, and Broadcast Receiver. You can understand them as follows:
a. Activity- It is a class that acts as the entry point representing a single screen to the user. It is like a window to show the user interface.
b. Services- Services are the longest-running component that runs in the background.
c. Content Provider- The content provider is an essential component that allows apps to share data between themselves.
d. Broadcast receivers- Broadcast receiver is another most crucial application component. It helps the apps to receive and respond to broadcast messages from the system or some other application.
9. What are the important components of Android Application?
The Components of Android application are listed below:
10. What are the widgets?
Widgets are the variations of Broadcast receivers. They are an important part of home screen customization. They often display some data and also allow users to perform actions on them. Mostly they display the app icon on the screen.
11. Can you name some types of widgets?
Mentioned below are the types of widgets-
a. Informative Widgets: These widgets show some important information. Like, the clock widget or a weather widget.
b. Collective Widgets: They are the collection of some types of elements. For example, a music widget that lets us change, skip, or forward the song.
c. Control Widgets: These widgets help us control the actions within the application through it. Like an email widget that helps check the recent mails.
d. Hybrid Widgets: Hybrid widgets are those that consist of at least two or more types of widgets.
12. What are Intents?
Intents are an important part of Android Applications. They enable communication between components of the same application as well as separate applications. The Intent signals the Android system about a certain event that has occurred.
13. Explain the types of intents briefly?
Intent is of three types that are-
a. Implicit Intents: Implicit intents are those in which there is no description of the component name but only the action.
b. Explicit Intents: In explicit intents, the target component is present by declaring the name of the component.
c. Pending Intents: These are those intents that act as a shield over the Intent objects. It covers the intent objects and grants permission to the external app components to access them.
14. What is a View?
A view is an important building block that helps in designing the user interface of the application. It can be a rectangular box or a circular shape, for example, Text View, Edit Text, Buttons, etc. Views occupy a certain area of the screen, and it is also responsible for event handling. A view is the superclass of all the graphical user interface components.
15. What do you understand by View Group?
It is the subclass of the ViewClass. It gives an invisible container to hold layouts or views. You can understand view groups as special views that are capable of holding other views, that are Child View.
16. What do you understand about Shared Preferences?
It is a simple mechanism for data storage in Android. In this, there is no need to create files, and using APIs, it stores the data in XML files. It stores the data in the pair of key-values. SharedPreferences class lets the user save the values and retrieve them when required. Using SharedPreferences we can save primitive data like- boolean, float, integer, string and long.
17. What is a Notification?
A notification is just like a message that shows up outside the Application UI to provide reminders to the users. They remind the user about a message received, or some other timely information from the app.
18. Give names of Notification types.
There are three types of notifications namely-
a. Toast Notification- This notification is the one that fades away sometime after it pops up.
b. Status Notification- This notification stays till the user takes some action on it.
c. Dialog Notification- This notification is the result of an Active Activity.
19. What are fragments?
A fragment is a part of the complete user interface. These are present in Activity, and an activity can have one or more fragments at the same time. We can reuse a fragment in multiple activities as well.
20. What are the types of fragments?
There are three types of fragments that are: Single Fragment, List Fragment, Fragment Transactions.
21. What are Layout XML files?
Layout XML files contain the structure for the user interface of the application. The XML file also contains various different layouts and views, and they also specify various GUI components that are there in Activity or fragments.
22. What are Resources in Android Application?
The resources in Android Apps defines images, texts, strings, colors, etc. Everything in resources directory is referenced in the source code of the app so that we can use them.
23. Can you develop Android Apps with languages other than Java? If so, name some.
Yes, there are many languages that we can work with, for the development of Android Applications. To name some, I would say Java, Python, C, C++, Kotlin, C#, Corona/LUA.
24. What are the states of the Activity Lifecycle?
Activity lifecycle has the following four stages-
a. Running State: As soon as the activity starts, it is the first state.
b. Paused State: When some other activity starts without closing the previous one, the running activity turns into the Paused state.
c. Resume State: When the activity opens again after being in pause state, it comes into the Resume State.
d. Stopped State: When the user closes the application or stops using it, the activity goes to the Stopped state.
25. What are some methods of Activity?
The methods of Activity are as follows:
26. How can you launch an activity in Android?
We launch an activity using Intents. For this we need to use intent as follows:
27. What is the service lifecycle?
There are two states of a service that are-
a. Started State: This is when the service starts its execution. A Services come in start state only through the startService() method.
b. Bounded State: A service is in the bounded state when it calls the method bindService().
28. What are some methods of Services?
The methods of service are as follows-
29. What are the types of Broadcast?
Broadcasts are of two types that are-
a. Ordered Broadcast: Ordered broadcasts are Synchronous and work in a proper order. It decides the order by using the priority assigned to the broadcasts.
b. Normal Broadcast: These are asynchronous and unordered. They are more efficient as they run unorderly and all at once. But, they lack full utilization of the results.
30. What are useful impotent folders in Android?
The impotent folders in an Android application are-
31. What are the important files for Android Application when working on Android Studio?
This is an important android studio interview question
There are following three files that we need to work on for an application to work-
a. The AndroidManifest.xml file: It has all the information about the application.
b. The MainActivity.java file: It is the app file that actually gets converted to the dalvik executable and runs the application. It is written in java.
c. The Activity_main.xml file: It is the layout file that is available in the res/layout directory. It is another mostly used file while developing the application.
32. Which database do you use for Android Application development?
The database that we use for Android Applications is SQLite. It is because SQLite is lightweight and specially developed for Android Apps. SQLite works the same way as SQL using the same commands.
33. Tell us some features of Android OS.
The best features of Android include-
34. Why did you learn Android development?
Learning Android Studio is a good idea because of the following-
35. What are the different ways of storage supported in Android?
The various storage ways supported in Android are as follows:
36. What are layouts?
Layout is nothing but arrangements of elements on the device screen. These elements can be images, tests, videos, anything. They basically define the structure of the Android user interface to make it user friendly.
37. How many layout types are there?
The type of layouts used in Android Apps are as follows:
38. What is an APK?
An APK stands for Android Package that is a file format of Android Applications. Android OS uses this package for the distribution and installation of the Android Application.
39. What is an Android Manifest file?
The manifest file describes all the essential information about the project application for build tools, Android operating system, and google play. This file is a must for every Android project that we develop, and it is present in the root of the project source set.
#android tutorials #android basic interview questions #android basic questions #android developer interview questions #android interview question and answer #android interview questions #android interview questions for experienced #android interview questions for fresher
Mobile wallet applications have become the new trend in today’s world. Apps like Amazon Pay, Paytm, PayPal are some of the leading apps that are owned and used by millions. Be it paying bills, recharging, or money transactions, everything has turned easier because of these apps. There were days when people used to travel for hours to do these tasks have been totally transformed. Moreover, consumers can use these e-wallet apps while paying in a store, either for shopping or while eating out. Thus, as far as mobile wallets are concerned, they are a convenient way for handling all the tasks involving finance.
As an aspiring entrepreneur, if you wish to succeed in your business, without second thoughts, go for Amazon Pay clone app development. Let’s narrow down your thinking processes for a quicker stride forward by analyzing the types of apps first.
Types of e-wallet apps you could develop:
Retail application: An app like Amazon is considered the retail app because it has a mobile wallet in it. It has all the basic functionalities, which helps users to redeem coupons and reward points. All the payment modes are accessible through the app, including net banking.
Dedicated app: The app allows P2P money transactions by storing a variety of cards. You could also make international money transfers using this app. Example: PayPal, Apple Pay, and Amazon Pay.
PoS payments: The PoS payment wallet apps are found at the stores. It is exclusively used by the users to make contactless payments without having to stand in a long queue.
Choose the best type of e-wallet app you want to develop and join forces with our Appdupe. Grab the cutting-edge Amazon Pay Clone script and launch an app in a week!
##amazon pay clone ##amazon pay clone script ##amazon pay clone app ##amazon pay clone app development ##amazon pay app clone ##amazon pay app clone development
Getting past the technical and coding interview is not always an easy task for most people.
Lucky for you, there are some amazing resources to help you go through easily and grab that position.
In this article, we will go through some of the best GitHub repositories to help you smash the coding interview.
These collections of repositories are essential in highlighting the different arears to focus on and different topics and questions to expect.
Front-end Developer Interview Questions
This repository is everything that entails frontend development.
Covered content includes:
#coding-interviews #technical-interview-tips #programming-interviews #interview-preparation #interview