Start Coding
Problemβ
When learning a new language, we first learn to output some message. Here, we'll start with the famous Hello World message. Now, here you are given a function to complete. Don't worry about the input and output of functions, just print "Hello World" message
Examples:β
Example 1:
Input: No input
Output: Hello World
Your task:β
Your task is to complete the function printHello() that prints Hello World.
- Expected Time Complexity:
- Expected Auxiliary Space:
Solutionβ
Pythonβ
def printHello(self) -> None:
print("Hello World")
Javaβ
public static void printHello() {
System.out.println("Hello World");
}
C++β
void printHello() {
cout<<"Hello World";
}
Cβ
void printHello() {
printf("Hello World\n");
}
- Time Complexity:
- Auxiliary Space: