Capitalize - HackerRank

October 11, 2022 ยท View on GitHub

Note: this question is from HackerRank

Objectives

You are asked to ensure that the first and last names of people begin with a capital letter in their passports. For example, alison heck should be capitalised correctly as Alison Heck.

Given a full name, your task is to capitalize the name appropriately.

Sample Input

chris alan

Sample Output

Chris Alan

Solution

Click here to view the solution