Riya Kumari

Riya Kumari

72 Articles Published

Articles by Riya Kumari

Page 3 of 8

Number of horizontal or vertical line segments to connect 3 points

Riya Kumari
Riya Kumari
Updated on 12-Jul-2023 362 Views

Suppose you are given three different points (or coordinates) and you want to find out number of horizontal or vertical line segments which can be made by connecting those three points. Such line segments together are also known as polyline. You need concepts of computational geometry in order to solve this problem. In this article, we will discuss various approaches in C++ to tackle this problem. Input Output Scenarios Suppose c1, c2 and c3 are coordinates of 3 points in a cartesian plane. The number of horizontal or vertical line segments to connect these 3 points will be given as ...

Read More

Number of handshakes such that a person shakes hands only once

Riya Kumari
Riya Kumari
Updated on 12-Jul-2023 453 Views

Suppose you are in a social gathering. Can you calculate how many handshakes you can do if you were to shakes only once? This question might sound intriguing to you. This can be solved mathematically by using permutations and combinations. However, the mathematical operation might be time-consuming. In this article, we will discuss how to solve such problem using C++. We will explore different approaches which ranges from mathematical formulas, to recursion, and other combinatorial techniques. Input Output Scenarios Suppose you have N number of people in a gathering. You want to calculate the number of handshakes possible ...

Read More

Number of elements greater than K in the range L to R using Fenwick Tree (offline queries)

Riya Kumari
Riya Kumari
Updated on 12-Jul-2023 473 Views

In the field of computer science, we have to process large datasets which includes query selection and update operations. It is a challenging task for the developers to execute these operations in real-time with less time complexity. Using Fenwick tree is an efficient way to tackle these range-based query problems. Fenwick Tree is a data structure which updates elements and calculates the prefix sums of the numbers in a table efficiently. It is also known as Binary Indexed Tree. In this article, we will discuss how to use Fenwick Trees for finding the number of elements greater ...

Read More

Number of divisors of product of N numbers

Riya Kumari
Riya Kumari
Updated on 12-Jul-2023 545 Views

Divisor of a number is which divides it exactly without any remainders. In other words, a divisor of a number n is the one which results in n when multiplied by any other integer. It can also be called as a factor of a number. Dividend ÷ Divisor = Quotient. For example, if we divide 60 with 5 we will get 12 and vice versa therefore, 12 and 60 can be considered as divisors of 60. Number of Divisors of Product of N Numbers Given task is to find the number of divisors of the product of the given ...

Read More

Number of divisors of a given number N which are divisible by K

Riya Kumari
Riya Kumari
Updated on 12-Jul-2023 443 Views

Finding the number of divisors of a given number N which is also divisible by K (any constant number) is a typical mathematical problem which requires lot of calculations. Here, K is usually a number which is less than or equal to square root of N. However, we can construct a C++ program by which counting such numbers will be an easier task. In this article, we will discuss different methods in C++ using which we can find solution to the above given problem. Input Output Scenarios If we consider the below scenario here we have N value as ...

Read More

How to specify order of classes using CSS?

Riya Kumari
Riya Kumari
Updated on 02-May-2023 1K+ Views

Cascading Style Sheets (CSS) is a powerful component of web development which enables the developers to determine the visual appearance of their websites. In CSS, classes are used as selectors which enables us to apply several specific styles to an element. You can also use multiple classes for a particular element. However, when you apply multiple classes to an element, it is necessary to know how to specify the order of these classes in which they will be rendered to avoid discrepancies and unexpected results. In this article, we will discuss different methods to specify the order of classes ...

Read More

How to create Paradoxical effect using CSS?

Riya Kumari
Riya Kumari
Updated on 02-May-2023 666 Views

The Paradoxical effect is a visual effect which is used to create optical illusion of any object, element or text that appears to move in a contradictory way. This effect can be used to add interesting and unique element to your web page. This can be easily created using HTML and CSS. In this article, we will discuss about the techniques and properties which is required for creating Paradoxical effect using CSS. We will start creating simple paradoxes using combination of two CSS properties simultaneously, and then dive into more advanced techniques which enables us to create complex paradoxical ...

Read More

What is the use of star-preceded property in CSS?

Riya Kumari
Riya Kumari
Updated on 02-May-2023 439 Views

In web development, CSS (Cascading Style Sheets) enables the developers to determine the visual appearance and layout of a website. However, since different web browsers have varying levels of support mechanism for CSS, it can result in inconsistency while rendering the web pages by the compiler. To overcome this compatibility issue, developers often opt for using CSS hacks to ensure that their web pages are displayed consistently across different browsers and devices. One such hack is the star-preceded property (also known as star property hack), which is used to target specific versions of Internet Explorer (IE) that have limited support ...

Read More

Primer CSS Typography Type Scale Utilities

Riya Kumari
Riya Kumari
Updated on 28-Apr-2023 245 Views

Primer CSS is a CSS framework collectively developed by various GitHub contributors. One of its components is typography which enables the developers to style the written content of the website. By applying these utility classes to the HTML elements, we can easily customize the visual appearance of our application. Here, in this article, we will discuss about the type scale utilities offered by Primer CSS and how to use them in our webpage. What are Type Scale Utilities? Type scale utilities are collection of properties which help in creating proper typography throughout your website. It consists of series of pre-defined ...

Read More

4 Different Ways to Center an Element Using CSS

Riya Kumari
Riya Kumari
Updated on 28-Apr-2023 384 Views

When designing a webpage or document, it's important to ensure that elements are visually balanced and positioned correctly. One common task in web development is to center an element within its container. While it may seem like a simple task, there are multiple ways to achieve this using CSS. In this article, we will explore four different methods for centering elements using CSS. We'll cover techniques using text-align, margin, Flexbox, and CSS Grid, and discuss the pros and cons of each method. Whether you're new to web development or looking to improve your skills, mastering these techniques will help you ...

Read More
Showing 21–30 of 72 articles
« Prev 1 2 3 4 5 8 Next »
Advertisements