Uncategorized

Trickier way to rotate matrix by 90 degree (Clockwise and Anticlockwise)

Given an n*n 2D matrix, rotate the given matrix by 90 Possible Examples:Before jumping directly to the solution approaches, lets discuss about the possible inputs and their respective outputs. i/p:[ [1,2,3], [4,5,6], [7,8,9]]//clockwiseo/p: [ [7,4,1], [8,5,2], [9,6,3]] //anticlockwise o/p: [ [3,6,9], [2,5,8], [1,4,7]] Video explanation of the solution approaches for this problem is given below:… Continue reading Trickier way to rotate matrix by 90 degree (Clockwise and Anticlockwise)

Computer Science

Intersection of two Arrays

Given two arrays, return a new array which consists of the intersection of the provided arrays. Video explanation of the solution approaches for this problem is given below: https://www.youtube.com/watch?v=TuaW6-gj0Zs Possible Examples:Before jumping directly to the solution approaches, lets discuss about the possible inputs and their respective outputs. i/p: arr1 = [3,2,1,2,10]arr2 = [8,3,2,2,1] o/p: [3,2,2,1]… Continue reading Intersection of two Arrays

Uncategorized

Next Greater Element in Array

Given an array, return the next greater element of all the elements in the array. Possible Examples:Before jumping directly to the solution approaches, lets discuss about the possible inputs and their respective outputs. i/p:[18,1,3,5,4,11,19] //return a map of (key, value) pairso/p:{1=3, 18=19, 3=5, 19=null, 4=11, 5=11, 11=19} public Map<Integer,Integer> nextGE(int[] arr){ //code your approach here}… Continue reading Next Greater Element in Array

Uncategorized

Search an element in sorted two dimensional Array

Given a m*n matrix with sorted rows and columns. Search a given element "x" in the matrix and return "true" for successful search otherwise return "false" , provided with the condition that first integer in each row is greater than the last integer of the previous row. Video explanation of the solution approaches for this… Continue reading Search an element in sorted two dimensional Array

Computer Science

Add one to the number represented as an array of digits

Explanation : Consider a given integer array as input e.g. [2,8,9] which is an array representation of integer 289 where first index is the Most Significant Digit and last index is the Least Significant Digit. Add 1 to the Least Significant Digit such that the resultant array will be [2,9,0]. Video explanation of the solution… Continue reading Add one to the number represented as an array of digits

Uncategorized

Campus Placements or GATE – A big confusion for Computer Science Engineering students

When I joined engineering from BIT Durg, my aim was to get placed in any of the MNC's visiting during placement season. Because of the typical mentality of Indian society, like other Indian parents, mine was also wished to have a job before I passed out from the college. It doesn't matter whether the package… Continue reading Campus Placements or GATE – A big confusion for Computer Science Engineering students

Uncategorized

Candidates must avoid these mistakes during the interviews

Undoubtedly, job interviews are really stressful. During this situation, candidates make mistakes which results in their rejection and most of the interviewer uses this statement for showing red flag to the candidate "So, we are done for the day". Discipline, Practice, Knowledge are interrelated to each other. Lack of discipline leads to lack of practice… Continue reading Candidates must avoid these mistakes during the interviews

Uncategorized

Master these three major areas to land a job in top product based MNC’s

It is easier to crack interviews if we obtain some pattern out of it. Interviews of the top product based MNC's like Amazon, Microsoft, Google are considered to be tougher than other product based companies. Whether the candidate is applying either for SDE (Software Development Engineer), MTS (Member Technical Staff) or Software developer/Engineer role, these… Continue reading Master these three major areas to land a job in top product based MNC’s