Lab 01
Here is a pdf version of the ppt I covered during the lab. And the codes that I (skimmed through) / (demonstrated live).
content.pdf (The pdf version of the ppt shown)
vectors.cpp (in-built functions of vectors and algorithms)
strings.cpp (in-built functions of strings and algorithms)
sideways_sorting.cpp (Solution to this problem)
Challenge Questions -
Q) Given a string, check if it is a palindrome or NOT without using any kind of loops / goto / recursive statements.
Solution
Use reverse(s.begin(), s.end()), where s is the string.Q) Given a list of names, how would you sort these names in alphabetical order ?