Roshan Dass’ Post

View profile for Roshan Dass, graphic

Student at Easwari Engineering College(SRM Group) Department of Artificial Intelligence and Data Science

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

  • No alternative text description for this image

To view or add a comment, sign in

Explore topics