You are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (clockwise). You have to rotate the image in-place, which means you have to modify the input 2D matrix directly. DO NOT allocate another 2D matrix and do the rotation.
SDE II Amazon
Bengaluru, Karnataka, India
Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero. Notice that the solution set must not contain duplicate triplets.
Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element.
Given a binary tree, write a function to get the maximum width of the given tree. The maximum width of a tree is the maximum width among all levels.
Given a string keyboard of length 26 indicating the layout of the keyboard (indexed from 0 to 25), initially your finger is at index 0
Design a coffee machine which makes different beverages based on set ingredients. The quantity of ingredients used for each beverage can vary
These types of questions are asked in interviews to Judge the Object-Oriented Design skill of a candidate. So, first of all, we should think about the classes.
Create your queue that will hold messages in form of JSON. Standard library queues were not allowed.There was one publisher that can generate messages and multiple subscribers that will listen to messages satisfying a particular regex
We will cover the architectural subjects that show up while scaling and doing performance tuning of large scale web applications in this blog.
Implement a MyCalendar class to store your events. A new event can be added if adding the event will not cause a double booking.