Showing posts with label Math. Show all posts
Showing posts with label Math. Show all posts
Monday, October 31, 2016
Number of common divisors of 2 numbers
Problem link: COMDIV - Number of common divisors
For this we need to know
CommonDivisor(a,b) = NumberOf Divisor(gcd(a,b)) proof
Find the number of divisors: Time Complexity O(sqrt(n))
tutorial for finding the number of divisors : progkriya
Solution:
For this we need to know
CommonDivisor(a,b) = NumberOf Divisor(gcd(a,b)) proof
Find the number of divisors: Time Complexity O(sqrt(n))
tutorial for finding the number of divisors : progkriya
Solution:
Sunday, October 30, 2016
Codeforces problem B Two Buttons analysis
Problem Type : BFS , math , greedy , shortest path
Problem link: Two Buttons
this was a very interesting for me.
This problem asks us what is the minimum steps we need to reach from one given number to another given number by multiplying by 2 or subtracting 1
i have found 2 ways to solve this problem
1) using bfs (hard way)
2) simple mathematics
The hard way:
let us try to analyze 2 given test cases
1) 4 ->6 minimum steps: 2
2) 10 ->1 minimum steps: 9
let us make a graph using the 2 test cases
Problem link: Two Buttons
this was a very interesting for me.
This problem asks us what is the minimum steps we need to reach from one given number to another given number by multiplying by 2 or subtracting 1
i have found 2 ways to solve this problem
1) using bfs (hard way)
2) simple mathematics
The hard way:
let us try to analyze 2 given test cases
1) 4 ->6 minimum steps: 2
2) 10 ->1 minimum steps: 9
let us make a graph using the 2 test cases
Thursday, September 29, 2016
Subscribe to:
Posts (Atom)
Football Player Transfer Prediction
Football Player Transfer Prediction Using Different Classifiers Project Report : Football Player Transfer Prediction Report ...
-
This Project has been designed and developed for fulfillment of my 2nd year,1st semester Project Work. Video:
-
Problem Type : BFS , math , greedy , shortest path Problem link: Two Buttons this was a very interesting for me. This problem asks u...