To learn more about the newsletter, check our detailed About Page + FAQs
To help me understand you better, please fill out this anonymous, 2-min survey. If you liked this post, make sure you hit the heart icon in this email.
Get a free Weekly Summary of the important updates in AI and Machine Learning here
Recommend this publication to Substack over here
Take the next step by subscribing here
I’d like to start with some exciting news,
Ahead of AI is an amazing AI publication, written by the amazing Sebastian Raschka. I have been following him for a bit and started recommending his writing when he started a Substack. Recently, he added this newsletter to his list of recommendations. This is a huge honor. A special thank you to all of you because it was your feedback and inputs that allowed me to refine my writing. And if you want to keep up with AI, check out Sebastian’s substack below.
Back to our problem. We got a fun one today.
This can be found as Problem 50. Pow(x, n) on Leetcode
. Link at the end of this email/post.
Sponsored Segment
AlphaSignal is a free weekly Summary of the top developments in Machine Learning. They use AI to rank and send you the top developments in the field. Check them out. Reading them is a great way to stay in touch with the field and support my writing.
https://alphasignal.ai/?referrer=Devansh
If you are someone interested in sponsoring this newsletter, let me know.
Problem
Implement pow(x, n), which calculates x
raised to the power n
(i.e., xn
).
Example 1:
Input: x = 2.00000, n = 10
Output: 1024.00000
Example 2:
Input: x = 2.10000, n = 3
Output: 9.26100
Example 3:
Input: x = 2.00000, n = -2
Output: 0.25000
Explanation: 2-2 = 1/22 = 1/4 = 0.25
Constraints:
-100.0 < x < 100.0
-231 <= n <= 231-1
n
is an integer.
-104 <= xn <= 104
I created Technology Made Simple using new techniques discovered through mentoring multiple people in top tech firms. The newsletter is designed to help you succeed, saving you from hours wasted on going through substandard resources, the Leetcode grind, or multi-hour-long lectures. I have a 100% satisfaction policy, so you can try it out at no risk to you. You can read the FAQs and find out more here. Use the button below to get 20% off for up to a whole year. Using this discount will drop the prices-
800 INR (10 USD) → 533 INR (8 USD) per Month
8000 INR (100 USD) → 6400INR (80 USD) per year
Before proceeding, if you have enjoyed this post so far, please make sure you like it (the little heart button in the email/post).
In the comments below, share what topic you want to focus on. I’d be interested in learning and will cover them. To learn more about the newsletter, check our detailed About Page + FAQs
If you liked this post, make sure you fill out this survey. It’s anonymous and will take 2 minutes of your time. It will help me understand you better, allowing for better content.
https://forms.gle/XfTXSjnC8W2wR9qT9
I see you living the dream.
Go kill all and Stay Woke,
Devansh <3
To make sure you get the most out of Technique Tuesdays, make sure you’re checking in the rest of the days as well. Leverage all the techniques I have discovered through my successful tutoring to easily succeed in your interviews and save your time and energy by joining the premium subscribers down below. Get a discount (for a whole year) using the button below
Reach out to me on:
Instagram: https://www.instagram.com/iseethings404/
Message me on Twitter: https://twitter.com/Machine01776819
My LinkedIn: https://www.linkedin.com/in/devansh-devansh-516004168/
My content:
Read my Machine Learning breakdowns: https://rb.gy/zn1aiu
My YouTube: https://rb.gy/88iwdd
Get a free stock on Robinhood. No risk to you, so not using the link is losing free money: https://join.robinhood.com/fnud75