Solution:
Solution:
Solution:
Solution:
export const towerBuilder = (nFloors: number): string[] => {
let array = [];
for (let i = nFloors; i >= 1; i--) {
let space = (nFloors - i);
let stars = i * 2 - 1;
array.push(" ".repeat(space) + "*".repeat(stars) + " ".repeat(space));
}
return array.reverse();
}
Solution:
export function meeting(s: string): string {
return s
.split(';')
.map((el) => '(' + el.split(':').reverse().join(', ').toUpperCase() + ')')
.sort()
.join('');
}