Competitive Programming 35??
Meghana Manchala
| B-tech in Software Engineering | Apollo x Kalvium | Second year |
Day 35: Two city scheduling, Maximum Units on Truck, Truncate a sentence, Stones Question, max length depth of binary trees
It's been a tree problem practice day with me and I have learned a lot about how tree problems work in programming with complex data and mixed problems of backtracking and recurssion to improve efficiency in coding.
This is brief overview of what i did today:
1. Two city scheduling:
This has been a problem of getting two cities' population with the least cost. This I have done without overspending in the distribution of people between the two cities.
2. Maximum Units on Truck:
Here, I had to fill in the boxes of the truck. Some boxes held much more inside others so a goal was to fit most in the truck. I learned to pick up the right ones that should be fitted in.
3. Truncate a sentence:
I learned how to truncate the string only to keeping the first few characters of a sentence. So if, for example, "The quick brown fox," were limited to three words, then I'd keep "The quick brown." That's an excellent practice about handling strings and splitting the text accordingly.
领英推荐
4.max length depth of binary trees:
This problem aims at finding the longest string that might be generated given the help of the unique substrings from a given set. More exercise in nice backtracking and manipulation of collection. Ensuring all the during concatenation only made use of different characters.
5. Stones Question:
In this problem there was a variation of a well-known ‘stone game’ in which you were the one who had to control and use stones as per the requirements of the game. This task required our simulation and optimization skills to be very well practiced as it needed a better understanding of the relevant data structure and algorithm optimization
"Where Logic Meets Creativity." - it's Coding
I hope you enjoyed solving as much as I did. Each one opens the door for pushing the science behind change of management and optimization a little bit further. Let's start this exciting journey, curious and determined. New adventures and exciting discoveries await us all!
Happy coding! See you on Day 36!??
#CodeQuest #CodingAdventures #ProblemSolving #CodeNewbie #DevJourney #ChangeMakers #EmbraceChange #AgileMindset #AdaptAndOvercome