Skip to content

P-1256/DSA_Problem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Approach

  1. Used a for loop starting from i=a.

  2. Increased i by d each time.

  3. Stoped when value of i exceeds b.

  4. If the number is even (i % 2 == 0), add it to evenSum.

  5. Print the final sum.

  6. Time Complexity -> O((p) where p=(b-a)/d

  7. Space Complexity -> O(1)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages