You are given a rectangular board of size N × M.
You have an unlimited number of dominoes of size 2 × 1. A domino may be placed either horizontally or vertically.
Determine the number of distinct ways to completely tile the board so that:
Since the answer may be very large, print it modulo 10^9 + 7.
N M
Print the number of valid tilings modulo 10^9 + 7.
Expert in Data Structures & Algorithms. Building tools to help developers crack FAANG interviews.