Skip to content

wheelsandbytes/dspractice1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

dspractice1

COP3530 1st practice assignment


Insert 0 into 1 2 3 4 5 & count steps

Starting from the end,

  1. compare 0 to 5
  2. 0 is smaller than 5, shift 5 to the right
  3. compare 0 to 4
  4. 0 is smaller than 4, shift 4 to the right
  5. compare 0 to 3
  6. 0 is smaller than 3, shift 3 to the right
  7. compare 0 to 2
  8. 0 is smaller than 2, shift 2 to the right
  9. compare 0 to 1
  10. 0 is smaller than 1, shift 1 to the right, insert 0

10 steps total.


Insert 10 into 1 2 3 4 5 & count steps

Starting from the end,

  1. compare 10 to 5
  2. 10 is larger than 5, insert 10 at the end

2 steps total.


Implemented using C++


Артём阿尔乔姆 University of Florida Computer Science cise.ufl.edu

About

COP3530 1st practice assignment

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages