These are so basics. I gave more than three to four interviews they are asking very tricky questions because count of freshers increases(recession period) so the level of interviews increases.
@@sadhana8115 Starting with basics to hard level questions like counting frequency in dictionary and append it in list, map function code, missing element in array with def function likewise.
Factorial is a terrible example. 1. Don't implement factorial in Python yourself. You have a built-in math library, it has a factorial() function. Don't teach beginners (who are clearly the target audience of your video) to reinvent the wheel; don't support the interviewers' habit of giving stupid examples as problems. 2. I understand that you needed to pull out an example with recursion and memoization, and the interviewers, apparently, can't come up with anything better than factorial. If you really need an example with memoization, don't teach beginners to invent their own again. Functools has an lru_cache decorator for this. 3. There is a big difference in efficiency between the loop solution and the recursion solution: loop is more efficient on average, but Python optimizes tail recursion and the difference is not so noticeable. This issue has nothing to do with what you said in the video about the efficiency of these algorithms. "Simple", "for beginners" and "just incorrect" are different things.
@@Analyticsvidhya def fibonacci_generator(n): a, b = 0, 1 for _ in range(n): yield a a, b = b, a + b fib_gen = fibonacci_generator(10) fib_result = list(fib_gen) print(fib_result)
when the number we enter is '2', inside the 'for loop' the range will become (2, int(2^0.5)+1), that is (2, int(1.414)+1), which equals (2,1+1) =(2,2) , this is an empty range because according to the range, it should start with 2 and end before 2..so that 'for loop' won't be executed. it will exit the loop and print "2 is a prime number". I hope this is clear to you.
Book FREE 1:1 Mentorship for Gen AI / Data Science
Link 🔗 bit.ly/3wlIIGz
These are so basics. I gave more than three to four interviews they are asking very tricky questions because count of freshers increases(recession period) so the level of interviews increases.
what were the questions they asked you in the technical interview ?
@@sadhana8115 Starting with basics to hard level questions like counting frequency in dictionary and append it in list, map function code, missing element in array with def function likewise.
If you want to clear interview in Easy Follow these channel
youtube.com/@tech.python07?si=o72jZn1OUzoucn0L
make intermediate and high level interview coding questions also soon..
Good basic interview questions 👍
Glad you liked ❤️
Excellent video! Thanks for clearly explaining each question in such a clear and calm manner. 👏
You're very welcome!
Helpful video👍
Thank you Nitika ❤️
kindly make intermediate and high level interview questions
If you want to clear interview in Easy Follow these channel
youtube.com/@tech.python07?si=o72jZn1OUzoucn0L
Please make a video on R Programming launguage.
We heard you Preet. Thanks for sharing :)
Your requirement will be shared with the Content team.
Factorial is a terrible example.
1. Don't implement factorial in Python yourself. You have a built-in math library, it has a factorial() function. Don't teach beginners (who are clearly the target audience of your video) to reinvent the wheel; don't support the interviewers' habit of giving stupid examples as problems.
2. I understand that you needed to pull out an example with recursion and memoization, and the interviewers, apparently, can't come up with anything better than factorial.
If you really need an example with memoization, don't teach beginners to invent their own again. Functools has an lru_cache decorator for this.
3. There is a big difference in efficiency between the loop solution and the recursion solution: loop is more efficient on average, but Python optimizes tail recursion and the difference is not so noticeable. This issue has nothing to do with what you said in the video about the efficiency of these algorithms.
"Simple", "for beginners" and "just incorrect" are different things.
Thanks for your feedback.
thanks for this video.
but in the last part, there is no recursive call in the function print fibonacci
Hey, thanks for bringing this up.
Will be great if you could write the code & share it herewith - for the benefit of the community. ♥
@@Analyticsvidhya def fibonacci_generator(n):
a, b = 0, 1
for _ in range(n):
yield a
a, b = b, a + b
fib_gen = fibonacci_generator(10)
fib_result = list(fib_gen)
print(fib_result)
2 also prime number but it fails
Thanks for pointing that out! It's always great to have viewers engaged with the content.
when the number we enter is '2', inside the 'for loop' the range will become (2, int(2^0.5)+1), that is (2, int(1.414)+1), which equals (2,1+1) =(2,2) , this is an empty range because according to the range, it should start with 2 and end before 2..so that 'for loop' won't be executed. it will exit the loop and print "2 is a prime number". I hope this is clear to you.