Given four integers x1, y1, x2 and y2, which represents two coordinates (x1, y1) and (x2, y2) of a two-dimensional graph. The task is to find the Euclidean distance between these two points.Euclidean distance between two points is the length of a straight line drawn between those two given points.Attention reader! Don’t stop learning now. […]

Continue ReadingGiven two positive integers N and S. The task is to minimize the number of increments on N (N = N + 1) required to make the sum of digits of N less than or equal to S. NOTE: N can range up to an18 digit number and 1

Continue ReadingGiven an array vec[] of size N of non-negative integers. The task is to count the number of subsequences with the sum equal to S – 2 where S is the sum of all the elements of the array.Examples:Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA […]

Continue ReadingGiven three strings A, B, and C of equal length, the task is to find the minimum number of replacement operations that can be performed such that any two out of the three strings become equal.Examples: Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course […]

Continue ReadingGiven an array arr[] containing N integers, the task is to find the maximum sum obtained by adding the elements at the same index of the original array and of the reversed array.Example:Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly […]

Continue Readingimport java.util.*; class GFG { public static void main(String[] args) { int[][] interval = { { 1, 3, 2 }, { 4, 5, 2 }, { 1, 5, 5 } }; int maxValue = maxTwoNonOverLapping(interval); System.out.println(maxValue); } public static int maxTwoNonOverLapping( int[][] interval) { Arrays.sort(interval, (a, b) -> a[0] – b[0]); PriorityQueue pq = new PriorityQueue( (a, b) -> a[0] – b[0]); int max = 0; int ans = 0; for (int[] e : interval) { while (!pq.isEmpty()) […]

Continue ReadingPwC is a Big 4 Consulting company that came to our college for the Role of Associate Bangalore, Mumbai, Chennai, Location.It Comprises 3 Rounds:Hey geek! It’s time to become a success story instead of reading them. Check out our most renowned DSA Self Paced Course, now at a student-friendly price and become industry ready. And […]

Continue ReadingHi Readers, Here is my Capgemini Interview Experience:At first, there will be a screening test, it is very easy, it will be of 4 sectionsHey geek! It’s time to become a success story instead of reading them. Check out our most renowned DSA Self Paced Course, now at a student-friendly price and become industry ready. […]

Continue ReadingHi folks, Visa visited our campus, hiring for SWE Intern and SWE roles in the month of October. I was an applicant for the SWE Intern profile. They were the fourth company to visit our campus for Summer Internships. It was a virtual hiring process.I had great fun preparing for the Visa visit, and really […]

Continue Reading