customization – How can I list the recent posts of a specif category and its descendants?

Category 1

  • Category 1.1
  • Category 1.2
  • Category 1.3

Category 2

  • Category 2.1
  • Category 2.2
  • Category 2.3

When user access SINGLE or ARCHIVE pages of category 1 or any of its descendants, he should see a list of 10 most recent posts of categories 1, 1.1, 1.2, 1.3. (Not the recent post of each category, but the most recent posts between the posts of all those categories).

If user is on 2.2 (archive or single page), he should see a list of the 10 most recent posts between categories 2, 2.1, 2.2, 2.3.

I couldn’t paste any code here, because I don’t have any idea on how to do this…

Can you guys help me?