
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Sunidhi Bansal has Published 1085 Articles

Sunidhi Bansal
503 Views
We are given with a language “L” and the task is to construct a pushdown automata for the given language which explains that the occurrences of 0’s will be the addition of occurrences of 1’s and 2’s and also, occurrence of 1 and 2 will be minimum one which can ... Read More

Sunidhi Bansal
239 Views
Given a binary tree with weights of its nodes. The goal is to find the number of nodes that have weights such that the number is power of two. If weight is 32 then it is 25 so this node will be counted.For ExampleInputThe tree which will be created after ... Read More

Sunidhi Bansal
144 Views
Given a binary tree with weights of its nodes. The goal is to find the number of nodes that have weights such that the number is a perfect square. If weight is 36 then it is 62 so this node will be counted.For ExampleInputThe tree which will be created after ... Read More

Sunidhi Bansal
171 Views
Given a binary tree with weights of its nodes as strings. The goal is to find the number of nodes that have weights such that the string contains a vowel. If weight is ‘aer’ then it has vowels ‘a’ and ‘e’ so the node will be counted.For ExampleInputThe tree which ... Read More

Sunidhi Bansal
246 Views
Given a binary tree with weights of its nodes. The goal is to find the number of nodes that have weights such that the sum of digits in that weights add up to an odd number. If weight is 12 then the digit sum is 3 which is odd so ... Read More

Sunidhi Bansal
330 Views
Given a binary tree and a value x as input. The goal is to find all the subtrees of a binary tree that have sum of weights of its nodes equal to x.For ExampleInputx = 14. The tree which will be created after inputting the values is given belowOutputCount of ... Read More

Sunidhi Bansal
342 Views
Given an array arr[] and an integer k as input. The goal is to find the number of subarrays of arr[] such that the product of elements of that subarray is divisible by k.For ExampleInputarr[] = {2, 1, 5, 8} k=4OutputCount of sub-arrays whose product is divisible by k are: ... Read More

Sunidhi Bansal
833 Views
Given a number size as input as dimension of size*size Chessboard. The goal is to find the number of squares that can be formed inside that board having odd lengths.For ExampleInputsize=3OutputCount of squares with odd side length in Chessboard are: 10ExplanationAll squares will be as shown : and 1 whole ... Read More

Sunidhi Bansal
403 Views
Given an array of numbers and an integer x as input. The goal is to find all the subsets of arr[] such that individual elements of that set as well as the sum of them fully divisible by x.For ExampleInputarr[] = {1, 2, 3, 4, 5, 6} x=3OutputCount of subsets ... Read More

Sunidhi Bansal
293 Views
Given two strings numo and demo as input. The goal is to find the number of common divisors of both the strings. The divisors of a string are found using following technique: If string str has sub1 as its divisor then we can construct str using sub1 by repeating it ... Read More