×

### Let's log you in.

or

Don't have a StudySoup account? Create one here!

×

### Create a StudySoup account

#### Be part of our community, it's free to join!

or

##### By creating an account you agree to StudySoup's terms and conditions and privacy policy

by: Gilson Dos Santos

33

1

0

Gilson Dos Santos
KSU
GPA 3.8
CS II data structures
Dr. Jonathan Maletic

These notes were just uploaded, and will be ready to view shortly.

Either way, we'll remind you when they're ready :)

Get a free preview of these Notes, just enter your email below.

×
Unlock Preview

notes in how to implement and understand recursive functions
COURSE
CS II data structures
PROF.
Dr. Jonathan Maletic
TYPE
Class Notes
PAGES
0
WORDS
KARMA
25 ?

## Popular in Computer Science and Engineering

This 0 page Class Notes was uploaded by Gilson Dos Santos on Monday November 2, 2015. The Class Notes belongs to 12589.201580 at Kent State University taught by Dr. Jonathan Maletic in Fall 2015. Since its upload, it has received 33 views. For similar materials see CS II data structures in Computer Science and Engineering at Kent State University.

## Popular in Computer Science and Engineering

×

×

×

### What is Karma?

#### You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 11/02/15
Gilson Dos Santos recurssion recurssiongtfunctions defined in terms of themselves ngt factorial nn 1 nlt1 basis nnl ngt1 recursive step int nfactint n can cause integer overflow or stack overflow on bigint ifnlt1return 1 else return nnfactnl if we do int main this will return the a value multile times untill it gets the result possible getting a stack overflow with a big numberit would take years to compute this function with a big number spends money and time coutltltnfact5 recursion not very effective a for loop would save more space and be more effective there is problems that are hard to do but would be fairly simple with recursion Fibonacci fibn 11235813 memory management algorithims use this to save space and mange memory fibN1 ltn1 fibn1fibn2 int fibint n ifnlt1return 1 else return fibn2fibn1 if we do this int main fib6 when calling this the program is going to split into fibn1 amp fibn1 and keeps spliting like a cell system computing one thing multiple times problems using recurssion enum thepolesleftrightmiddle just tells it is a typethepoles with 3 variants and it is enumerated Class pole Public pole polethe poles xpx friend stdostreamamp operatorltltstdostreamamppole private thepoles p stdostreamamp operatorltltStdostreamoutpole x switchxp case leftoutltlt left break case rightoutltlt right break case middleoutltlt middle return out void moveint nple srcple Aux pole dest ifn1 coutltlt move disk from srcltlt to ltltdestltltednl else moven1srcdestaux coutltlt move disk from ltltsrcltltquottoquotltltdestltltendl moven1auxsrcdest

×

×

### BOOM! Enjoy Your Free Notes!

×

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

## Why people love StudySoup

Bentley McCaw University of Florida

#### "I was shooting for a perfect 4.0 GPA this semester. Having StudySoup as a study aid was critical to helping me achieve my goal...and I nailed it!"

Anthony Lee UC Santa Barbara

#### "I bought an awesome study guide, which helped me get an A in my Math 34B class this quarter!"

Jim McGreen Ohio University

Forbes

#### "Their 'Elite Notetakers' are making over \$1,200/month in sales by creating high quality content that helps their classmates in a time of need."

Become an Elite Notetaker and start selling your notes online!
×

### Refund Policy

#### STUDYSOUP CANCELLATION POLICY

All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email support@studysoup.com

#### STUDYSOUP REFUND POLICY

StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here: support@studysoup.com

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to support@studysoup.com