The phrase "have difficulty doing something" is used to express that someone finds it hard or challenging to perform a specific action. Here's a breakdown of its usage and structure:

Structure:
Subject + have/has + (adjective) difficulty + (in) + gerund (verb-ing) + ...
The preposition "in" is optional and often omitted in casual speech.
Adjective modifiers (e.g., much, a lot of, some, no) can describe the level of difficulty.
Examples:
1. Basic usage:
"She had difficulty (in) solving the puzzle."
"They have a lot of difficulty understanding the instructions."
2. With modifiers:
"He had no difficulty passing the exam."
"I have some difficulty remembering names."
Common Mistakes:
❌ Incorrect: "I have difficulty to finish my work."
✅ Correct: "I have difficulty finishing my work."
Use a gerund (verb-ing), not an infinitive (to + verb).
Variations:
1. "Have difficulty with + noun":
"She has difficulty with math."
2. Synonyms:
"Struggle to + verb": "He struggles to concentrate."
"Find it hard to + verb": "They find it hard to wake up early."
Notes:
Formal vs. Informal: Including "in" (e.g., "difficulty in doing") is slightly more formal but less common in everyday speech.
Uncountable noun: "Difficulty" is usually singular (not "difficulties" unless referring to specific challenges).
Let me know if you need further examples or clarification!