Given a tree and a node, the task is to reverse the path till the given Node and print the in-order traversal of the modified tree....
Given N tanks connected like a tree, the connections between them in an array Edge[][], and the capacity of each tank in the array cap[], the task is to find the minimum amount of water required to pour into the given tank such that all the tanks are filled....
Accolite visited our campus for full time Software development....
Given a string S of size N consisting of ‘0’, ‘1’ and ‘?’, where N is always even. Divide the string into two different strings say S1 and S2, where S1 will only contain the characters at even indices of S and S2 will only contain the characters at odd indices of S. The task is to find the minimum possible steps required to predict which one of the two strings S1 and S2 will have the maximum count of 1’s. In one step, choose one character for either S1 or S2. If the character is ‘0‘ then pick ‘0‘, if the character is ‘1‘ then pick ‘1‘ and if the character is ‘?‘ then choose any one of ‘1‘ or ‘0‘....
Given a string S of size N and containing digits in the range [0-9], the task is to print the count of all the unique subsequences of a string that are the power of 2....
Infineon Technologies visited our campus in April 2021(virtually) for software and hardware interns. I applied for a software role. They conducted 1 online round + 4 rounds of interviews. It was a 3 days process. Around 800-900 aspirants applied and out of that only 450 CVs were shortlisted for the online test....
Open for CSE, MnC, ECE, EEE. (All Majors)...
Given an array arr[] consisting of N integers and a positive integer K, the task is to find all permutations of the array arr[] such that the sum of Bitwise AND of adjacent elements in each permutation is greater than or equal to K. If no such permutation exists, print “-1”....
Given an array arr[] of N integers along with integers M, L, R. Consider a variable S(initially 0). The task is to find the maximum count of values of S % M that lies in the range [L, R] after performing the following operations for each element in the given array:...
Round 1
1) There are M chocolate packets each packet can have variable number of chocolates in each packet. There are N students (N < M). Distribute chocolate packets to student such that
a) each student gets 1 packet
b) suppose m1,m2,…mn are the packets which are chosen to be distributed in sorted order of number of chocolates in them (nm-n1 must be minimum)
M = 1, 3, 4, 6 (4 packets with specified number of chocolates in them)
N = 2
Ans = 3,4...
Given a binary tree where node contains characters, the task is to count the number of paths from root vertex to leaf such that at least one permutation of the node values in the path is a palindrome.Examples:...
Given a string S, the task is to find the length longest sub-string which is a palindromeExamples:...