- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- 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 34494 Articles for Programming
![Thanweera Nourin A V](https://www.tutorialspoint.com/assets/profiles/687554/profile/60_3473688-1694414827.jpeg)
2K+ Views
In this article, our aim is to determine the Simple Moving Average of the given values in the array. Let us take a quick glance at what Simple Moving Average means. The average derived from the data over a certain amount of time (t) is known as the simple moving average. In a typical mean, the Simple Moving Average value changes as a result of changing data, but in this kind of mean, it also varies over time. After obtaining the mean for a given period t, some earlier data is then eliminated. We receive new mean once more ... Read More
![Thanweera Nourin A V](https://www.tutorialspoint.com/assets/profiles/687554/profile/60_3473688-1694414827.jpeg)
63 Views
In this article our aim is to determine the most steps one can take in a row, provided the heights of the adjacent buildings, to gain altitude as he moves in from roof of one to the roof of the adjacent building. That is building heights for each one after another are provided. You can proceed from one building's roof to the next one down the block. You must determine how many consecutive steps you could indeed take in a row while still gaining altitude with each one. Problem Statement Maximize consecutive steps one can put forward on ... Read More
![Thanweera Nourin A V](https://www.tutorialspoint.com/assets/profiles/687554/profile/60_3473688-1694414827.jpeg)
99 Views
The aim of this article here is to make the elements distinct in a sorted array by minimum increments. First, an array of integers that has been sorted is provided. By increasing the values and keeping the array sum as low as possible, we must make array elements discrete from one another. As the output, we must display the smallest amount as the sum that is achievable. Problem Statement Make elements distinct in a sorted array by minimum increments. Approach Given an integer array of sorted numbers. We first check whether the elements in the given ... Read More
![Thanweera Nourin A V](https://www.tutorialspoint.com/assets/profiles/687554/profile/60_3473688-1694414827.jpeg)
216 Views
In this article, our primary aim is to come up with a solution to implement a random-0-6-Generator using the given random-0-1-Generator. As we know, A random-0-1-Generator() function returns either 0 or 1 as the output. Similarly, a random-0-6-Generator, as the name suggests, gives any random numbers between 0 and 6 (including 0 and 6). Also, a main point to keep in mind is that the random-0-6-Generator should generate random numbers ranging between 1 to 6, with equal probability. That is the probability of obtaining any number should always be the same. Example For instance, the random ... Read More
![Thanweera Nourin A V](https://www.tutorialspoint.com/assets/profiles/687554/profile/60_3473688-1694414827.jpeg)
2K+ Views
A Fibonacci series is found in every row of the Fibonacci triangle. What is a fibonacci series? In the Fibonacci series, each digit equals the sum of the two integers before it. This series' first two digits are 1 and 1. The next elements in the series are computed as the sum of two numbers previous to it. The Fibonacci series is produced as 1+1=2, 2+3=5, 3+5=8, 8+13=21, 13+21=34 and so on. Likewise, the Fibonacci triangle series goes like 1, 1, 2, 3, 5, 8, 13, 21, 34, 55… Problem Statement Implement a program to ... Read More
![Thanweera Nourin A V](https://www.tutorialspoint.com/assets/profiles/687554/profile/60_3473688-1694414827.jpeg)
2K+ Views
Imagine yourself in a situation where you are having trouble coming up with a solution to your initial issue. What if I told you that a small part of the problem is simpler to solve and that you can use this answer to find the answer to the larger one? Interesting? The decrease and conquer strategy achieves just this. A problem-solving strategy known as "Decrease and Conquer" involves slicing the size of the input at every stage of the solution procedure. Identical to divide-and-conquer as it breaks the problem down into smaller sub-problems, decrease-and-conquer reduces the size of the ... Read More
![Thanweera Nourin A V](https://www.tutorialspoint.com/assets/profiles/687554/profile/60_3473688-1694414827.jpeg)
52 Views
In this article, we take the challenge to determine whether or not the given binary number's decimal form can be divided by 20. The base-2 numeral system, often known as the binary numeral system, is a way of expressing numbers in mathematics that employs just two symbols, commonly "0" (zero) and "1." (one). For instance, the decimal number 4 is represented as 100 in binary form. The binary form of the decimal number 6 is 110. The binary representation is 11100 for the decimal number 28. Now think how the decimal number 1, 23, 45, 687 can be represented as ... Read More
![Avinash Gupta](https://www.tutorialspoint.com/assets/profiles/701626/profile/60_691552-1692786372.jpg)
172 Views
This is the problem based on stringstream class present in C++ “sstream” header file. Here, we have to find those strings whose lengths are greater than “k”. This task will be performed by using stringstream class. The concept is to partition the string and then iterate through the defined words. The value of length k has to be specified to obtain the words which are larger than k whereas the length of the words which are smaller than k will not be displayed in the output. In this article, we will understand how to find words which are greater than ... Read More
![Avinash Gupta](https://www.tutorialspoint.com/assets/profiles/701626/profile/60_691552-1692786372.jpg)
133 Views
In this problem, our task is to find the length of the longest possible subsequence present in two strings such that every letter of the subsequence must be a vowel. With the help of the recursive algorithm and iterative algorithm, the given problem statement can be solved. In English Alphabet, there exist five vowels named 'A', 'E', 'I', 'O', 'U'. Subsequence Vs. Substring: In Subsequence, we may take characters in a non-continuous way, but in Substring, we can take only continuous characters. Ex: In String “TutorialsPoint”: “tri” is a subsequence but not a substring. While “tor” is both subsequence ... Read More
![Eva Sharma](https://www.tutorialspoint.com/assets/profiles/614747/profile/60_1298397-1678427862.jpeg)
81 Views
In mathematics, a Stella Octangula number is a figurate number based on the Stella Octangula, of the form n(2n2 − 1). Stella Octangula numbers which are perfect squares are 1 and 9653449. Problem Statement Given a number n, check whether it is the Stella Octangula number or not. The sequence of Stella Octangula numbers is 0, 1, 14, 51, 124, 245, 426, 679, 1016, 1449, 1990 Example1 Input x = 14 Output Yes Explanation $$\mathrm{For\: n = 2, expression \:n\lgroup 2n^2 – 1\rgroup is\: 14}$$ Example2 Input n = 22 Output No Explanation $$\mathrm{There \:is\: no\: ... Read More