Skip to content

My implementations for Coursera's Data Structures and Algorithms Specialization

License

Notifications You must be signed in to change notification settings

mehtarit/bedrock

Repository files navigation

Bedrock

My implementation of algorithms for Coursera's Data Structures and Algorithms Specialization

1. A Plus B

Adds two numbers and returns the result (Max time used: 0.01/1.00, max memory used: 9580544/536870912)

2. Maximum Pairwise Product

Returns the product of the two largest integers in an array (Max time used: 0.08/1.00, max memory used: 22851584/536870912.)

3. Fibonacci

Returns the nth Fibonacci number (Max time used: 0.00/1.00, max memory used: 9629696/536870912.)

4. Fibonacci Last Digit

Returns the last digit of the nth fibonacci number (Max time used: 0.00/1.00, max memory used: 9588736/536870912.)

5. Greatest Common Divisor (gcd)

Returns the gcd of any two numbers (Max time used: 0.01/1.00, max memory used: 9895936/536870912.)

6. Least Common Multiple (lcm)

Returns the lcm of any two numbers (Max time used: 0.05/1.00, max memory used: 9928704/536870912.)

7. Fibonacci Huge

Return Fn mod m where Fn is the nth Fibonacci number. n can be as large as 10^18 and m is at most 10^3. (Max time used: 0.02/1.00, max memory used: 9912320/536870912.)

8. Last Digit of Sum of Fibonacci Numbers

Return the last digit of sum of fibonacci numbers up to any n, where n can be as large as 10^18. (Max time used: 0.00/1.00, max memory used: 9609216/536870912.)

9. Last digit of the Partial Sum of Fibonacci Numbers

Return the last digit of a partial sum of fibonacci numbers from m to n, where both can be as large as 10^18 (Max time used: 0.01/1.00, max memory used: 9609216/536870912.)

10. Last digit of the sum of squares of fibonacci numbers

Returnt the last digit of the sum of squares of fibonacci number n, where n can be as large as 10^18 (Max time used: 0.00/1.00, max memory used: 9605120/536870912.)

About

My implementations for Coursera's Data Structures and Algorithms Specialization

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages