Skip to content

Instantly share code, notes, and snippets.

@Ch-sriram
Created October 12, 2020 01:10
Series AP [TC: O(1); SC: O(1)]
// Problem Link: https://practice.geeksforgeeks.org/problems/series-ap5310/1
int nthTermOfAP(int A1, int A2, int N) { return A1 + (N-1) * (A2-A1); }
@Ch-sriram
Copy link
Author

Sorry, something went wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment