-
Write a function that takes in two numbers and recursively multiplies them together.
-
Write a function that takes in a base and an exp and recursively computes base exp . You are not allowed to use the ** operator!
-
Write a function using recursion to print numbers from n to 0.
-
Write a function using recursion to print numbers from 0 to n (you just need to change one line in the program of problem 1).
-
Write a function using recursion that takes in a string and returns a reversed copy of the string. The only string operation you are allowed to use is string concatenation.
-
Write a function using recursion to check if a number n is prime (you have to check whether n is divisible by any number below n).
-
Write a recursive function that takes in one argument n and computes F n , the n th value of the Fibonacci sequence. Recall that the Fibonacci sequence is defined by the relation
F n = F n−1 + F n−2
where F 0 = 0 and F 1 = 1
Visit the Wikipedia page on the Fibonacci Number for more information if you’re still confused.
recursion-exercises's Introduction
recursion-exercises's People
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.