Simran Kumari has Published 24 Articles

Number of triangles in a plane if no more than two points are collinear

Simran Kumari

Simran Kumari

Updated on 23-Mar-2023 14:35:32

150 Views

Let us see how to calculate the number of triangles in a plane with n number of points given, with the constraint that not more than two points are collinear. Computing the number of triangles in a plane with no more than two collinear points is a typical problem in ... Read More

Different ways to represent N as the sum of K non-zero integers

Simran Kumari

Simran Kumari

Updated on 23-Mar-2023 14:31:37

518 Views

The problem “Different ways to represent N as the sum of K non-zero integers” has many real-world use cases. Cryptography − In cryptography, specific cryptographic methods are designed using the concept of encoding a number N as the sum of K non-zero integers. Representing an integer N as the sum ... Read More

Compute power of power k times % m

Simran Kumari

Simran Kumari

Updated on 23-Mar-2023 14:29:30

86 Views

Our objective to compute power of power k time % m, with the values of base, k and m provided as input − Look at the image above. Have you ever tried to compute such a problem? Let’s try it. Compute the power of power k times and ... Read More

Check whether an array can fit into another array by rearranging the elements in the array

Simran Kumari

Simran Kumari

Updated on 23-Mar-2023 14:27:13

230 Views

From the problem statement, we can understand that given two arrays, we have to check whether the first array can fit into the second array. In the real world, there are many instances where we need to check whether an array can fit into another array by rearranging the elements ... Read More

Advertisements