Scholars who know Hebrew and study the Bible say it was assembled during the time of King David or Solomon, about 1000
B.C. by one author. He did use multiple sources, some he names directly in the Bible, such as the Book of Jasher, the Book of the Wars of the Lord, etc.
The Flood was Way before King David.