Simran Kumari

Simran Kumari

23 Articles Published

Articles by Simran Kumari

Page 3 of 3

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

Simran Kumari
Simran Kumari
Updated on 23-Mar-2023 904 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 of K non-zero integers might appear as a subproblem in different optimization issues in the context of optimization methods. Machine learning − In machine learning, feature vectors that depict the distribution of data points can be created by using the problem of representing an integer N as the sum of ...

Read More

Compute power of power k times % m

Simran Kumari
Simran Kumari
Updated on 23-Mar-2023 244 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 then find modulo with m. Explanation In this question, x, k, and m are given. Compute ${x^{x{^x{^{^.{^{^.{^{^.}}}}}}}}}$ up to k times and then modulo with m. Let’s understand with an example. Given, x = 2, k = 4, and m = 6 So, Compute $2^{2^{2{^2}}}\:=\:4^{2{^2}}\:=\:16^2\:=\:256$ Then 256 % 6 ...

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 387 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 in the array. For a variety of reasons, programmers may need to reorder the items of an array to see if they can fit into another array. Memory management in computer programming is one such reason. When working with huge amounts of data, it is frequently more effective to use ...

Read More
Showing 21–23 of 23 articles
« Prev 1 2 3 Next »
Advertisements