7 kyu
Crossed words
153 of 192sgoi
Description:
Crossed words
This is a fun Kata for crossword lovers!
S
Y
N
T
GRAPHICAL
E
S
I
S
Task
Write a function that takes two strings as input, and outputs the two words crossing.
Input
Two strings, str1
and str2
.
- There is a maximum of 20 characters for each word.
- The words may be a different lengths.
- The words will be in capital letters and have no other characters.
- The words will always share at least one common letter, so you do not need to worry about invalid cases.
Output
- Your function should output the first word horizontally and the second word vertically.
- The words cross at the point of the first instance of a common letter in the second word.
- A space character is used to fill the blank spaces.
- Each line ends with the newline character.
Example
str1 = "GRAPHICAL"
str2 = "SYNTHESIS"
returns the sample at the top.
Strings
Algorithms
Logic
Puzzles
Similar Kata:
Stats:
Created | Aug 14, 2018 |
Published | Aug 17, 2018 |
Warriors Trained | 800 |
Total Skips | 25 |
Total Code Submissions | 1762 |
Total Times Completed | 192 |
JavaScript Completions | 153 |
Python Completions | 48 |
Total Stars | 23 |
% of votes with a positive feedback rating | 85% of 68 |
Total "Very Satisfied" Votes | 51 |
Total "Somewhat Satisfied" Votes | 14 |
Total "Not Satisfied" Votes | 3 |
Total Rank Assessments | 9 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 5 kyu |
Lowest Assessed Rank | 8 kyu |