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: