Scala Interview Questions | Cloud Data Engineer #ProgrammingTips #adf #scala #java

preview_player
Показать описание
Q57. Write a Scala Program to Find a Factorial of Given number using Tail Recursion

Scala Factorial with Tail Recursion! 🚀 Efficient & safe recursion. Learn how to write it! #Scala #TailRecursion #Factorial

Watch now and learn! #Azure #DataFactory #CloudArchitectAbhiram

Don't forget to like, comment, and subscribe for more Scala interview preparation content! 🔥💡

👉 If you found this video helpful, don’t forget to hit the like button and subscribe for more Scala tutorials!
📢 Have questions or tips of your own? Drop them in the comments below!
Рекомендации по теме
Комментарии
Автор

scala> def facttail(a: Int, result:Int):Int={
| if(a==1)
| result
| else
| facttail(a-1, result*a)
| }
facttail: (a: Int, result: Int)Int

[scala> facttail(4, 1)
res30: Int = 24

CloudMaster_Abhiram
welcome to shbcf.ru