Angle Between a Chord and a Tangent in C++

Manisha Chand
Updated on 08-Aug-2025 11:17:45

164 Views

In this problem, we are given a circle whose chord and tangent meet at a particular point. The angle in the alternate segment of a circle is given. We need to find the angle between the chord and the tangent. According to the Alternate Segment Theorem the angle between a chord and a tangent is equal to the angle in the alternate segment of the circle. Chord and Tangent The chord of a circle can be defined as the line segment joining any two points on ... Read More

10 Essential Web Scraping Tools

sudhir sharma
Updated on 08-Aug-2025 10:43:32

146 Views

Data is more than just a business asset – it's a strategic advantage. Whether you're monitoring competitors, tracking product prices, gathering SEO insights, or creating machine learning models, relevant and structured web data is the modern gold. That’s where web scraping can become your winning strategy. Web scraping is the extraction of digital data and information from websites. Most businesses use it for market research, lead generation, brand monitoring, and much more. But scraping the modern web is way different nowadays, with dynamic content, anti-bot systems, and ever-changing layouts making it more difficult by the day. Depending on your needs, ... Read More

Count Substrings that Start and End with 1 in C++

Nishu Kumari
Updated on 08-Aug-2025 10:33:58

508 Views

We are given the length of a binary string str and the string itself. The task is to count the number of substrings that start with '1' and end with '1'. A binary string contains only '0's and '1's, and a substring is any continuous part of the given string. Let's look at a few example scenarios to understand the problem clearly: Scenario 1 Input: N = 5, str = "11101" Output: 6 Explanation: In the given binary string, there are 6 substrings that start and end with '1'. These are: ("11", "111", "1110", "11101", "1101", and "101"). Scenario ... Read More

Check If Any Permutation of a Number is Divisible by 3 and Palindromic in Python

Yaswanth Varma
Updated on 07-Aug-2025 18:49:53

196 Views

Divisibility by 3 The given task is to determine whether the permutation of the digits of the given number can form a new number that satisfies two conditions: it must be divisible by 3 and also be a palindromic number. A number is said to be palindromic if the reversal of a number is the same as the original, such as 121 or 1331, and a number is said to be divisible by 3 if the sum of its digits is divisible by 3. For example, let's look at the following scenarios:  Scenario 1 Input: 121 Output: False Explanation: ... Read More

Check If Any Permutation of a Large Number Is Divisible by 8 in Python

Yaswanth Varma
Updated on 07-Aug-2025 18:38:46

931 Views

Divisibility By 8 According to the divisibility rule of 8, if the last three digits of a number are divisible by 8, then the entire number is divisible by 8. While this is easy to check for small numbers, when it comes to large numbers, generating all the possible permutations is impractical for large inputs. However, we can solve this problem by taking advantage of the divisibility rule and limiting our check to possible combinations of three digits. Scenario 1 Input: "61" Output: Yes Explanation: For the given input, the possible permutations of the digits are 16 and 61. Among ... Read More

Shift Array Elements to the Left in Java

Alshifa Hasnain
Updated on 07-Aug-2025 18:19:53

994 Views

What Is Left Shifting in an Array? Shifting the array elements to the left by the given number of positions is also known as left rotation of the array. The element at the beginning gets pushed out of the front during the shift, but instead of being deleted, they are re-attached at the end of the array. Let us consider an example for a better understanding: Original Array: After 1 Left Shift: We can see in the above figure that, after the first shift, the element "1" is pushed out and then reattached at the end of the ... Read More

Shuffle an Array Using List in Java

Alshifa Hasnain
Updated on 07-Aug-2025 17:33:30

269 Views

In this article, we will learn how to shuffle an array using a list in Java. To do so, we will be using: Using Collections.shuffle() Method Using Fisher-Yates shuffle Using Java Streams Using Collections.shuffle() Method Shuffling an array means randomly rearranging its elements. The Java Collections framework provides the Collections.shuffle() Method, which shuffles a list. Since this method shuffles the list randomly, the order of the resultant elements is different each time we use it. Example Following is the program to shuffle an array using a ... Read More

Find Total Number of Distinct Years from a String in C++ Program

Aman Kumar
Updated on 07-Aug-2025 16:06:02

719 Views

In this article, we will write a C++ program to find the total number of distinct years from a string. Here, we have a string that contains the words and the dates. Our task is to find the number of distinct years mentioned. Let's see the following example scenario to understand the problem better: Scenario 1 Input: str = "The Berlin Wall fell on 09/11/1989. The first website was launched on 06/08/1991." Output: Total number of distinct years: 2 Explanation: Two distinct years are referenced: 1989, and 1991 Scenario 2 Input: str = "TutorialsPoint India was founded on ... Read More

Find Node with Minimum Value in a Binary Search Tree in C++

Farhan Muhamed
Updated on 07-Aug-2025 16:00:04

3K+ Views

In this article, we will explain how to find the node with the minimum value in a binary search tree (BST) and provide a C++ implementation. A binary search tree is a data structure that stores data in a sorted order such that for every node, the left subtree contains values less than the node's value, and the right subtree contains values greater than the node's value. Find Minimum Value in a Binary Search Tree Given the root node of a binary search tree, the task is to find the node with the minimum value in the tree. The ... Read More

Check If Large Number is Divisible by 19 in Python

Yaswanth Varma
Updated on 07-Aug-2025 13:10:58

413 Views

In mathematics, Divisibility helps us to determine whether a number can be divided by another without leaving a remainder. For example, 6 is divisible by 2 because 6/2 = 3 with no remainder. In this article, we are going to learn how to check if any large number is divisible by 19 or not in Python. Checking if any Large Number is Divisible by 19 Checking for the divisibility with small numbers can be easily handled by using the standard arithmetic operations. While dealing with the large numbers (contains 20, 30 or even 100 digits), the programming languages may run ... Read More

Advertisements