Send a pull request only after completing all 31 algorithms.
Please submit all PRs on or before January 10th 11:59 PM IST.
We have a small collection of algorithms, one for every day of the month. Scroll down to take a look at them. All you need to do is fork this repository, implement all 31 algorithms and send a pull request over to us. Check out our FAQ for more information.
- December 1 - Sherlock's Quest
- December 2 - The Convo!
- December 3 - Meet and Greet!
- December 4 - Spoiled Or Not
- December 5 - The Grand Master
- FAQ
- Maintainers
- It's the final quest of Sherlock Holmes. The Moriarty wants Sherlock dead and is hiding behind a door on the same floor. To make sure he gets killed, Moriarty has filled all the rooms except the one he is in with poisonous gas.
- The door number behind which he is hiding is designed in such a way that the sum of the left half and right half of the square of the number is equal to the number and is also a multiple of 3.
Room: 45
Status: Safe
Room: 36
Status: Not Safe
45 is a multiple of 3
45^2 = 2025
20 + 25 = 45
- Two friends were talking over the phone. They suddenly started to play a puzzle using the keypad.
- The keypad contains digits from 2-9 inclusive. Develop a small algorithm to return all the possible letter combinations that the number could represent.
- Only 2 character combinations are allowed.
- First you should display the character corresponding to the first number and then display the character corresponding to the second number.
Input: 32
Output: ["da","db","dc","ea","eb","ec","fa","fb","fc"]
- Sundar is an employee at Google. He comes to office at
9:00
and leaves office at17:00
. - One day he got a sudden message from a employee to schedule a metting for 1 hour. He, Can choose any time between his working hours. But, Sundar is a busy employee already had several meetings on that day.
- Develop an algorithm to finds an interval time which is greater than meeting time (i.e) 1 hour. So, Sundar can attend his meeting accordingly.
Input: ["0930", "1100"],["1200","1330"],["1530","1630"]
Output: ["1100","1200"],["1330","1530"]
- He comes to office by
9:00
the first meeting starts at9:30
so he can't assign a meeting. - The first meeting overs at
10:00
and the next meeting starts at12:00
. Now, He has 1 hour gap. So, he can assign a meeting in between that. - Again he has interval of 2 hour between
13:30
to15:30
so he can assign a meeting at that time.
- All times are calculated in 24 hours format.
- The working hour and meeting time is constant
- You are given with a list of manufacturing dates of each ice cream and also a list of days for the expiry of each ice cream from the date of manufacturing.
- On a given date find the number of ice creams spoiled. You may assume that all the dates are in
DD/MM/YYYY
format. - If an Ice Cream expires on the given day then the ice cream is not spoiled. You may assume that all months have only
30
days.
Number of Ice Creams : 3
Manufacture Dates : [10, 01, 2020],[13, 01, 2020],[20, 12, 2019]
Best Befor days : 20 13 20
Given Date : [28, 01, 2020]
No of ice creams spoiled: 2
Expiry Date of Ice cream 1 = [10, 01, 2020] + 20 days = [30, 01, 2020]
Expiry Date of Ice cream 2 = [13, 01, 2020] + 13 days = [26, 01, 2020]
Expiry Date of Ice cream 3 = [20, 12, 2019] + 20 days = [10, 01, 2020]
On the given date ([28, 01, 2020]) ice creams 2 & 3 has expired.
- Try completing the problem in time complexity
O(n/4)
.
- It was a dark and stormy night where an Oldman and his grandson were playing chess. The Oldman gave his grandson a problem, to check his knowledge and skills in chess.
- He stated that, It was a square chessboard of
A x B
size, the position of Knight(C, D)
and position of a target(E, F)
is given. - Now the Grandson needs to find out the minimum steps a Knight will take to reach the target position.
Dimension of Board : 6 6
Position of Knight : 1 1
Target Position : 4 5
Minimum Steps : 3
- From the starting position of the Knight
(1,1)
. The Knight can move to either(3,2)
or(2,3)
. We choose(3,2)
. - From
(3,2)
the Knight can move to(5,1)
,(1,3)
,(2,4)
,(4,4)
,(5,3)
,(1,1)
. We choose(5,3)
. - From
(5,3)
the Knight moves to(4,5)
. - The Minimum steps required is
3
.
Krishnakanth | Mahalakshumi | Dhiraj V | Aravind R | Tarun | Ashik | Harshini |
---|---|---|---|---|---|---|
π¨π§ | π¨π§ | |
π | π | π | π |
Anyone who is passionate about coding and can dedicate a little time a day for the challenge for the next 31 days.
You don't need to submit it everyday. Just submit it once you're done with all 31 algorithms.
Not a problem. While coding every day is nice, we understand that other commitments might interfere with it. Plus its holiday season. So you don't have to solve one problem every day. Go at your own pace. One per day or 7 a week or even all 30 in a day.
Anything! New to GoLang? Best way to practice it. Wanna find out what all this hype about Python is? Use it! Any and all languages are welcomed. Maybe you could try using a different language for every problem as a mini-challenge?
If you are new to Git or GitHub, check out this small tutorial from our team and GitHub
Our code ninjas are hard at work preparing the rest of the problems. Don't worry, they'll be up soon.
We have a folder for each day of the month. Simply complete your code and move the file into that folder. Be sure to rename your file to the following format: language_username
or language_username_problemname
Some examples:
python3_exampleUser.py
c_exampleUser.c
Please do not modify any existing files in the repository.
I forked the repository but some problems were added only after that. How do I access those problems?
Not to worry! Open your nearest terminal or command prompt and navigate over to your forked repository. Enter these commands:
git remote add upstream https://github.com/SVCE-ACM/A-December-of-Algorithms-2020.git
git fetch upstream
git merge upstream/master
If you're curious, the commands simply add a new remote called upstream that is linked to this repository. Then it 'fetches' or retrieves the contents of the repository and attempts to merge it with your progress. Note that if you've already added the upstream repository, you don't need to re-add it in the future while fetching the newer questions.
This shouldn't happen unless you modify an existing file in the repository. There's a lot of potential troubleshooting that might be needed, but the simplest thing to do is to make a copy of your code outside the repository and then clone it once again. Now repeat the steps from the answer above. Merge it and then add your code. Now proceed as usual. :)
Open up an issue on this repository and we'll do our best to help you out.