## Subarray with given sum

Given a list of integers,our task is to find if a sub-sequence which adds to a given number exists or not. Example- The given list is (1,4,20,5,5) and the given...

Skip to content
# Tag: algorithm

## Subarray with given sum

Given a list of integers,our task is to find if a sub-sequence which adds to a given number exists or not. Example- The given list is (1,4,20,5,5) and the given...

## Best Code to find n to the power k(n^k)

All's the Code !

To find n^k,using brute force, ALGORITHM- Initialize result to 1. Iterate from 1 to k and multiply n to result. Return result. CODE- result=1; for(i=1;i<=k;i...