×

### Let's log you in.

or

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

×

or

by: Shlomo Oved

4

0

2

# Week 3 Notes Data Structures CS UY 2134

Marketplace > New York University > CS UY 2134 > Week 3 Notes Data Structures
Shlomo Oved
NYU

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

×
Unlock Preview

These notes cover 3rd week lecture
COURSE
Data Structures & Algorithms
PROF.
Linda M Sellie
TYPE
Class Notes
PAGES
2
WORDS
KARMA
25 ?

## Popular in Department

This 2 page Class Notes was uploaded by Shlomo Oved on Sunday September 25, 2016. The Class Notes belongs to CS UY 2134 at New York University taught by Linda M Sellie in Fall 2016. Since its upload, it has received 4 views.

×

## Reviews for Week 3 Notes Data Structures

×

×

### 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: 09/25/16
Shlomi  Oved   Data  Structures  and  Algorithms   09/25/16   • 09/21/16  Lecture  (Week  3)   • String  Streams-­‐  only  presented  to  help  you  do  a  future  hw.   • Used  to  read  data  from  strings  and  write  data  from  strings.   • A  stream  object  “wraps  around”  a  string  to  allow  >>  (extraction  operator)   and  <<  (insertion  operator)  to  be  used.   • Exception-­‐  only  presented  so  I  can  use  in  code  examples  I  will  not  ask  you  to   use  them   • STL-­‐  This  lecture       • Vector<string>  fields;   • String  data=  “101,,Van  Cortlandt  Park-­‐…(long  string)”   • Stringstream  datastream(std::move(data));   • String  field;   • Getline(datastream,  field,  ‘,’);   • Fields.push_back(std::move(field));   • Getline(datastream,  field,  ‘,’);  //empty  string   • Fields.push_back(std::move(field));       • Cout  <<  fields[]  <<  fields[0]  <<  endl;     • String  to  a  double:   • String  aSgtring=”3.14159”;   • Double  d=atof(c  string)  GET  FROM  SLIDES     • Exception  Handling   • Try  blocks  and  catch  blocks   • Try{…   • V.pop_back();   • }   • catch(const  UnderFlowException  &  e){   •  cout  <<  “Print  something”  <<  endl;   • }       • STL   • Lists   • Sequence  Containers   • Set  and  Unordered  Set  and  Dictionary(Map  and  Unordered  Map)   • Associate  Containers   • Container  Adapters-­‐  stack,  and  queue   • Iterators-­‐  Bidirectional,  Forward,  and  Random  Access  Iterators   • Possible  Operations  of  Iterators   • Forward  Iterators:   • Itr++,  ++itr,  *itr,  itr1==itr2,  itr1  !=  itr2,  itr-­‐>m   • Bi-­‐Directional  iterators:   Shlomi  Oved   Data  Structures  and  Algorithms   09/25/16   • -­‐-­‐itr,  itr-­‐-­‐,  Itr++,  ++itr,  *itr,  itr1==itr2,  itr1  !=  itr2,  itr-­‐>m   • Random  Access  iterators:   • Itr1<  itr2,  itr1  <=  itr2,  itr-­‐=c,  itr  +=c,  itr2-­‐itr1,  itr1+c,  itr1-­‐c,  itr[c],  itr1>=itr2,   itr1>itr2,  -­‐-­‐itr,  itr-­‐-­‐,  Itr++,  ++itr,  *itr,  itr1==itr2,  itr1  !=  itr2,  itr-­‐>m   •

×

×

### 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!"

Amaris Trozzo George Washington University

#### "I made \$350 in just two days after posting my first study guide."

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!"

Parker Thompson 500 Startups

#### "It's a great way for students to improve their educational experience and it seemed like a product that everybody wants, so all the people participating are winning."

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