21.09.2024 Leetcode 100 Days Challenge - Day 3 Problem No : 50 A Feeling of Pride on reaching my first milestone of solving 50 Problems on Leetcode, and a sheer Feeling of Grit to acheive more. Solving programs on Leetcode has surely reflected my potential and I desire further enrichment. Solution: class Solution: def myPow(self, x, n): if n == 0: return 1 if n < 0: x = 1 / x n = -n if n % 2 == 0: return self.myPow(x * x, n // 2) else: return x * self.myPow(x * x, (n - 1) // 2) Easwari Engineering College(SRM Group) Dr. Kalai Selvi Thanupillai Revathi paramanathan Vijayaraj Janarthanan
Roshan Dass’ Post
More Relevant Posts
-
"Day 51 of the LeetCode challenge! 🔥 Moving beyond 50 and pushing forward with even more determination. Every problem strengthens my skills and deepens my understanding. The journey of growth continues! 💻🚀 #LeetCode #ProblemSolving #CodingJourney #TechSkills #DailyChallenge #ContinuousImprovement" Easwari Engineering College(SRM Group)... LeetCode...
To view or add a comment, sign in
-
🔍 Day 28 of #30daysofcode Challenge! 📝 Challenge: 2037. Minimum Number of Moves to Seat Everyone 🎯In this challenge, you are given an array of integers representing the positions of seats and another array representing the positions of people. Your task is to determine the minimum number of moves required to seat everyone such that each person occupies a seat. A move is defined as a person moving from one position to an adjacent position. Optimize the seating arrangement to minimize the total number of moves needed.🚀 #CodingChallenge #30daysofcode #CorporateCulture Parul University byteXL
To view or add a comment, sign in
-
"Day 22 of the LeetCode challenge! 💡 Continuing the journey of problem-solving and skill-building. Each challenge pushes me to think deeper and improve my approach. The progress feels great, and there's so much more to learn! 💻🚀 #LeetCode #ProblemSolving #CodingJourney #TechSkills #DailyChallenge #ContinuousLearning" Easwari Engineering College(SRM Group)...
To view or add a comment, sign in
-
#Day56 🚀Day 56 of my 100-day LeetCode challenge is complete! Each day brings new challenges, but the growth is real. Staying consistent and learning with each step! #LeetCode #100DaysOfCode #ProblemSolving Easwari Engineering College(SRM Group)!! LeetCode!!
To view or add a comment, sign in
-
💡 Day 3 of the 31 Days of Code Challenge 💡 Taking full advantage of today’s holiday, I not only continued with my #DrGViswanathan Challenge but also participated in a GeeksforGeeks contest—and I’m happy to say, I did pretty well! 🎉 It’s been a productive day filled with coding and problem-solving! Today’s challenge was an interesting problem involving keypad combinations. Given a keypad and an N-digit number, the task was to list all possible words formed by pressing the corresponding keys, just like we used to text back in the day. 📱 Problem Summary: Given an array representing numbers pressed on a keypad, the goal was to generate all possible letter combinations. For example, pressing 2, 3, and 4 could generate combinations like adg, adh, afg, etc. It was all about recursive backtracking to explore every possible combination. Approach: Mapping keypad to letters: I first set up an array mapping each number to the corresponding letters on a traditional phone keypad. Recursive backtracking: Starting with the first digit, I recursively generated every possible letter combination for the given sequence of numbers. For each digit, I appended a letter to a combination, moved to the next digit, and repeated the process. Storing results: Once all digits were processed, the generated word was stored in the result list. The recursion ensured all combinations were explored efficiently. Takeaway: The problem was a great exercise in recursive backtracking, and it felt rewarding to generate a long list of word combinations! It’s exciting to push through these challenges while juggling a coding contest as well. Day 3 complete! 🚀 #DrGViswanathanChallenge #31DaysOfCode #CodingChallenge #GeeksforGeeks #Contest #KeypadCombinations #ProblemSolving #VITBhopal #Lions #Day3Complete #CodingJourney #TechChallenge
To view or add a comment, sign in
-
"Day 58 of the LeetCode challenge! 💡 Another day, another problem solved, and more lessons learned. Staying consistent and focused on building a stronger problem-solving mindset. The journey continues! 💻🚀 #LeetCode #ProblemSolving #CodingJourney #TechSkills #DailyChallenge #ContinuousLearning" Easwari Engineering College(SRM Group)... LeetCode...
To view or add a comment, sign in
-
"Day 57 of the LeetCode challenge! 🔥 Another problem solved, another step closer to mastering problem-solving. Each day reinforces the value of consistency and perseverance. Let’s keep striving for excellence! 💻🚀 #LeetCode #ProblemSolving #CodingJourney #TechSkills #DailyChallenge #GrowthMindset" Easwari Engineering College(SRM Group)... LeetCode...
To view or add a comment, sign in
-
#Day43 Another step forward in this journey! 💪 Each problem is a new opportunity to grow and improve. 🌱 Small wins, consistency, and the drive to keep pushing forward—this is what makes it all worthwhile. 🔥 Excited to keep going, eager to learn, and grateful for every bit of progress! 🙌 #100DaysOfCode #LeetCode #ProblemSolving #CodeChallenge Easwari Engineering College(SRM Group)!! LeetCode!!
To view or add a comment, sign in
-
"Day 55 of the LeetCode challenge! 💡 Another problem solved and another step forward in my coding journey. Each challenge teaches me something new and keeps the excitement alive. Let’s keep the momentum going! 💻🚀 #LeetCode #ProblemSolving #CodingJourney #TechSkills #DailyChallenge #ContinuousImprovement" Easwari Engineering College(SRM Group)... LeetCode...
To view or add a comment, sign in
-
#Day39 Tackled a problem focused on finding the best possible outcome by identifying key values efficiently. Today’s solution felt streamlined and effective, reinforcing a straightforward approach. #100DaysOfCode 🚀 #LeetCode 💻 #Coding 👨💻 #Challenge 🔥 Easwari Engineering College(SRM Group)!! LeetCode!!
To view or add a comment, sign in