A string manipulation problem that introduces character frequency analysis and comparison.
Given two strings, determine if they are anagrams while ignoring case and spaces. Two strings are anagrams if they contain exactly the same characters with the same frequency, regardless of their order.
Your task: Determine if the two given strings are anagrams of each other, ignoring case and spaces.
Input:
String1: "listen"
String2: "silent"
Output:
true
Input:
String1: "hello"
String2: "world"
Output:
false
Input:
String1: "The Eyes"
String2: "They See"
Output:
true
A divide-and-conquer sorting algorithm that efficiently sorts arrays through recursive merging.
Design an algorithm to sort an array of n elements in ascending order using the Merge Sort technique. Merge Sort works by dividing the array into smaller subarrays, sorting them recursively, and then merging them back together in sorted order.
This problem teaches you about divide-and-conquer algorithms, recursion, and efficient sorting techniques with O(n log n) time complexity.
Your task: Implement the merge sort algorithm to sort an array in ascending order.
Input:
Array of n elements
Output:
Sorted array in ascending order
A mathematical problem that challenges you to determine number parity using minimal code without conditionals.
Given an integer, determine whether it is odd or even without using conditional statements (if else), in the most concise code possible. This is a code golf challenge where the goal is to write the shortest possible solution.
Your task: Determine if the given integer is odd or even using the most concise code possible without conditional statements (if else).
Input:
An integer
Output:
Indication of whether the number is odd or even