AfterAcademy Tech
This is an interview problem asked in companies like Amazon, Microsoft, Yahoo and Adobe. The problem is to design a stack that will support push(), pop(), top() and getMin() operation in constant time. We will be discussing two different ways to approach this problem.
Given a sorted array A[] with possibly duplicate elements, write a program to find indexes of first and last occurrences of an element k in the given array. This question will clear your concept of Binary Search
Given an array of integers A[ ], if i < j and A[i] > A[j] then the pair (i, j) is called the inversion of an array A[ ]. You need to write a program to find the total counts of inversion in an array A[ ]. The inversion count of an array suggests how close the array is from being sorted. This problem has been asked in Amazon and Google's interview.
If you want to share your knowledge with others and want to learn back from them, then you must be in some community. Developer Student Clubs is one such community by Google Developers. Learn how to become a Developer Student Clubs lead at your campus.
Heap is a very useful data structure that every programmer should know well. The heap data structure is used in Heap Sort, Priority Queues. The understanding of heaps helps us to know about memory management. In this blog, we will discuss the various about Heap Building and Heap Sort.
You are given an array A with N elements. You need to find the longest increasing subsequence in the array.
Find the LCP. This is a very famous interview problem and demonstrates the use of various approaches and techniques to solve.
You are given a linked list, write a program to remove the nth node from the end of the list and return the head. This problem has been previously asked in Google and Amazon and requires the understanding of the linked list to solve it.
Given a stack, you have to sort it in ascending order. You can use another stack if you need auxiliary space. The problem is asked in Google, Microsoft and Amazon and requires knowledge of Stack and recursion to solve it.
Write an algorithm to find the minimum number of operations required to convert string S1 into S2.