Created
October 12, 2020 01:10
-
-
Save Ch-sriram/f2a855b6ed16229f07599f95bf30bb8c to your computer and use it in GitHub Desktop.
Series AP [TC: O(1); SC: O(1)]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Problem Link: https://practice.geeksforgeeks.org/problems/series-ap5310/1 | |
int nthTermOfAP(int A1, int A2, int N) { return A1 + (N-1) * (A2-A1); } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem Link