Reverse tree path using Queue
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....
read more
Minimize water to fill all tanks connected by given circuit
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....
read more
Accolite Interview Experience | Set 7 (On-Campus)
Accolite visited our campus for full time Software development....
read more
Minimum steps to determine the subsequence with max 1s based on given conditions
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‘....
read more
Count of unique subsequences from given number which are power of 2
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....
read more
Infineon Technologies Internship Interview Experience for SDE | On-Campus
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....
read more
Myntra Interview Experience for Internship | On-Campus 2020
Open for CSE, MnC, ECE, EEE. (All Majors)...
read more
Permutations of an array having sum of Bitwise AND of adjacent elements at least K
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”....
read more
Maximum count of values of S modulo M lying in a range [L, R] after performing given operations on the array
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:...
read more
Flipkart Interview Experience | Set 24
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...
read more
Count of root to leaf paths whose permutation is palindrome in a Binary Tree
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:...
read more
Length of longest palindromic sub-string : Recursion
Given a string S, the task is to find the length longest sub-string which is a palindromeExamples:...
read more