properties of sets, lists, vectors and strings are and whether they are mutable or immutable.
SOB 22 – (Block 2)
Write up what the properties of sets, lists,
Hint:
Try and think of a problem (or maybe one you have already solved as part of the exercises) and try and solve it using the different data structures, e.g. first with lists, then vector, then sets. Which do you think works best? They might all be suitable? Is there a problem that you can think of where the one is suitable and the other is not (the key thing here is to understand how they differ)?
[2:50 PM] E.g. a student was trying to add all the elements of 2 vectors together. He solved the problem with vectors. Can he use lists or sets? Show this by writing code in Racket to make your point.
Step by step
Solved in 3 steps