Interview Preparation

Top Interview Preparation Questions For Product Based Companies

Must Do Interview Preparations Questions To Crack Product based Companies By Anuj Kumar Sharma (SDE at Amazon) These are a List of the most important Data Structures and Algorithms everyone should practice to crack any product based companies Data Structures: Array Kadane’s Algorithmhttps://www.geeksforgeeks.org/largest-sum-contiguous-subarray/ N/2, N/3 greatest Numberhttps://leetcode.com/problems/majority-element/https://leetcode.com/problems/majority-element-ii/https://www.geeksforgeeks.org/given-an-array-of-of-size-n-finds-all-the-elements-that-appear-more-than-nk-times/ Merge overlapping intervalshttps://leetcode.com/problems/merge-intervals/ Rotate matrixhttps://leetcode.com/problems/rotate-image/ Buy / Sell

Top Interview Preparation Questions For Product Based Companies Read More »

Kadane’s Algorithm

Problems:  Given an array arr of N integers. Find the contiguous sub-array with maximum sum. Example 1: Input: N = 5arr[] = {1,2,3,-2,5} Output: 9 Explanation: Max subarray sum is 9 of elements (1, 2, 3, -2, 5) which  is a contiguous subarray. Example 2: Input: N = 4arr[] = {-1,-2,-3,-4} Output: -1 Explanation: Max

Kadane’s Algorithm Read More »