# Pad an Array

# I worked on this challenge [by myself, with: ]

# I spent [] hours on this challenge.


# Complete each step below according to the challenge directions and
# include it in this file. Also make sure everything that isn't code
# is commented in the file.



# 0. Pseudocode

# What is the input?
# What is the output? (i.e. What should the code return?)
# What are the steps needed to solve the problem?


# 1. Initial Solution
def pad!(array, min_size, value = nil) #destructive
  # Your code here
end

def pad(array, min_size, value = nil) #non-destructive
  # Your code here
end


# 3. Refactored Solution



# 4. Reflection
# Pad an Array

# I worked on this challenge [by myself, with: ]

# I spent [] hours on this challenge.


# Complete each step below according to the challenge directions and
# include it in this file. Also make sure everything that isn't code
# is commented in the file.



# 0. Pseudocode

# What is the input?
# What is the output? (i.e. What should the code return?)
# What are the steps needed to solve the problem?


# 1. Initial Solution
# def pad!(array, min_size, value = nil)
#   if array.length >= min_size
#     return array

#   end
#   dif = min_size - array.length
#    dif.times do
#     array.push value

#   end
#     return array

#   end
#  pad!([1, 3, 5], 5)

def pad(array, min_size, value = nil) #non-destructive
   if array.length >= min_size
     return array


  end
  dif = min_size - array.length
   dif.times do
    new_ray = Array.new(dif) #{|x| x = value }

  end
    return new_ray

  end
pad([1, 3, 5], 5)


# 3. Refactored Solution



# 4. Reflection
Add first draft of peer 5.2
Add first draft of peer 5.2
