Skip to content

Answers of some coding questions form the famous coding ninja website

Notifications You must be signed in to change notification settings

mr-siddhantchoudhary/codingNinjas_questions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

codingNinjas_questions

You are given a number 'N' and a query 'Q'. if 'Q' is 1, then you have to return the sum of all integer form 1 to 'N', else if 'Q' is equal to 2 then you have to return the product of all integer form 1 to 'N'. Since thr product can be very large, return it modulo 10 ^ 9 + 7.

for example:

Given 'N' = 4, 'Q' = 1. then the answer is 10 because the sum of all integers between 1 and 4 are 1, 2, 3 and 4. hence 1 + 2 + 3 + 4 is equal to 10.

About

Answers of some coding questions form the famous coding ninja website

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages