
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
Found 26504 Articles for Server Side Programming

406 Views
In this problem, we are given a number N. Our task is to create a Program to find N-th term of series 3, 6, 18, 24, … in C++.Problem Description − To find the Nth term of the series −3, 6, 18, 24, 45, 54, 84 … N TermsWe need to find the general formula for the given series.Let’s take an example to understand the problem, Input − N = 10Output − 150Solution Approach:To find the general term of the series, we will first observe the series and check all the possible generalizations of the series. Like, 3 is common ... Read More

122 Views
In this problem, we are given a number N. Our task is to create a Program to find N-th term of series 3 , 5 , 21 , 51 , 95 , … in C++.Problem Description − To find the Nth terms of the series −3, 5, 21, 51, 95, 153, … N-TermsWe need to find the general formula of the series, which is a quadratic equation (based increase in the series).Let’s take an example to understand the problem, Input − N = 6Output − 153Solution Approach:To solve the problem, we will find the general formula for the nth term ... Read More

203 Views
In this problem, we are given a number N. Our task is to create a program to find N-th term of series 2, 4, 3, 4, 15… in C++.Problem Description − To find the sum of the given series, 2, 4, 3, 4, 15, 0, 14, 16 .... N termsWe will find the formula for the general term of the series.Let’s take an example to understand the problem, Input − N = 9Output − 9Solution Approach:The increase of the values in the series is linear i.e. no square values are in the series. Also, it’s value depends on other factors ... Read More

126 Views
In this problem, we are given a number N. Our task is to create a program to find N-th term of series 1 4 15 24 45 60 92... in C++.Problem description − To find the nth term of the series −1, 4, 15, 24, 45, 60, 92, 112 … N termsWe will find the general formula for the series.Let’s take an example to understand the problem, Input − N = 6Output − 60Solution Approach, The general term of the series is based on whether the value of N is even or odd. This type of series is a bit ... Read More

204 Views
We are given a number let’s say num and the task is to calculate the total number of bits changed when 1 is added to a number.Binary representation of a number is done by converting the given number into the form of 0’s and 1’s and it is done by various methods. In one method, we calculate the LCM of a given number by 2 and if a reminder is other than 0 then the bit is set to 1 else it will be set to 0.Addition table for bits are0 + 1 = 1 1 + 0 = 1 ... Read More

514 Views
We are given a number let’s say, num and the task is to calculate the count of binary strings that can be formed through the given number num containing only o’s and 1’s.Binary Number System is one the type of Number Representation techniques. It is most popular and used in digital systems. Binary system is used for representing binary quantities which can be represented by any device that has only two operating states or possible conditions. For example, a switch has only two states: open or close.In the Binary System, there are only two symbols or possible digit values, i.e., ... Read More

1K+ Views
We are given a binary tree and the task is to calculate the count of full nodes available in a binary tree using iterative and recursive approach. Full nodes are those nodes who have both the children and no child is null. Note that in full nodes we consider nodes with exactly two children.Binary Tree is a special data structure used for data storage purposes. A binary tree has a special condition that each node can have a maximum of two children. A binary tree has the benefits of both an ordered array and a linked list as search is ... Read More

452 Views
We are given a binary tree and the task is to calculate the count of half nodes available in a binary tree using iterative and recursive approach. Half nodes are those nodes who have only one child and another child is null. Note that in half nodes we don't consider leaf nodes.Binary Tree is a special data structure used for data storage purposes. A binary tree has a special condition that each node can have a maximum of two children. A binary tree has the benefits of both an ordered array and a linked list as search is as quick ... Read More

623 Views
We are given a vector and the task is to calculate the count of those elements in a vector that matches a target value or condition.Vectors are sequence containers that can change size. Container is an object that holds data of the same type. Sequence containers store elements strictly in linear sequence.Vector stores elements in contiguous memory locations and enables direct access to any element using subscript operator []. Unlike arrays, vectors can shrink or expand as needed at run time. The storage of the vector is handled automatically.To support shrink and expand functionality at runtime, vector containers may allocate ... Read More

715 Views
We are given a string with let’s say str of any length and the task is to calculate the count of consonants in the given string using both iterative and recursive methods.Consonants are those alphabets that are not vowel i.e alphabets except a, i, e, o, u are considered as consonants. So in the program below we need to find the count of alphabets other than these in string.The Recursion and Iteration both repeatedly execute the set of instructions. Recursion is when a statement in a function calls itself repeatedly. The iteration is when a loop repeatedly executes until the ... Read More