Explain recursion with an example.
Answer / nashiinformaticssolutions
o Recursion is a technique where a function calls itself to solve smaller sub-problems.
8. def factorial(n):
9. if n == 1:
10. return 1
11. else:
12. return n * factorial(n - 1)
13. print(factorial(5)) # Output: 120
Is This Answer Correct ? | 0 Yes | 0 No |
What are the Advantages of HashMap over Vector?
if 3 duplicate records, by keeping one original and one duplicate record, and how to delete remaining 2 duplicates in sql server 2008
How can recruiter justified that the candidate is expert in Algorithm and datastructure for Software product development ?
please any one pass file aid,xpeditor and endeavor tools
i want to insert textbox value to sql db. i have only one text box but store four values. ple give any one give sample code in asp.net c#..
When you?re running a component within ASP.NET, what process is it running within on Windows XP? Windows 2000? Windows 2003?
Need provab technical test questions
how many languages .net is supporting now?
How many packages available in java??
hi..this is kartheek..complted mca in 2009..but i dont have knowledge in programing..but to learn new language.. which one is suitable for me?is SAP or IBM mainframes is suitable for me..?if it suits how much will it costs..?pls answer...
What is the difference between procedure -oriented language and object oriented language?
22 Answers IBM, Infosys, TCS,
how do i add a column dynamically in a table by using java application?