/* Write a function to create a Christmas tree based on height h. * tree(0) ➞ [] * tree(1) ➞ "#" tree(2) ➞ " # ", "###" tree(5) ➞ " # ", " ### ", " ##### ", " ####### ", "#########" // 0000 5 0000 // 000 555 000 // 00 55555 00 // 0 5555555 0 // 555555555 // the "whorls" [each level of the tree] are odd in length. // the integer passed to the function will create // "h" amount of strings. // the length of each whorl is "h" +"h-1" // airSpace ("air") around the branches is "air" std::vector treeX(int h) { std::vector whorl; int maxWhorl = h + (h-1); for(;h>0;h--){ c = "#"; // create the base of the tree & maxWhorl } } */ std::vector tree(int h) { std::vector r; // set the base whorl (abs protects against 0 height tree) std::string base = std::string(abs(h+h-1),'#'); for(int i=0;i