Ruby (Version 3.1.4 and above) Rails (Version 7.1.3.2)
git clone https://github.com/pjavadi84/crosswords
cd crosswords
bundle install
rails db:create db:migrate
rails s
This challenge should be solved using Ruby, but you can use another programming language if you prefer.
Showcase your computer science knowledge, coding skill, and attention to details
The most important thing is to have a completed, working, and correct implementation first
If possible reduce space/time complexity
- Wikipedia
- Programming Language documentation
- Coding tutorial
- Books
- Inclusion (within the solution) external libraries. However, be prepare to defend your decision
- The help of another person
- The help of an AI program (unless you wrote the AI from scratch to solve this problem)
- Solutions (or partial solutions) found online or in printed materials that is solved by someone else
Complete the CrossWords.intersect
method that returns a single string result.
Each input is expected to be a single word, consisting of only letters a-z
Locate the earliest possible intersection of characters between the two words & crosses both words on the above intersection
The first word is to be rendered horizontally; while the second, vertically. The results are returned as a single string
cat & hat:
h
cat
t
balloon & bat
balloon
a
t
faint & test
faint
e
s
t
road & dad
d
road
d
dad & road
r
o
dad
d