。
She thought hard about whether to go or stay.
Literal
She [topic-は] go [or-か] stay [or-か] [object-を] thought-deeply.
熟考する ('to think deeply, to deliberate, to consider thoroughly') is a Sino-Japanese verb with a literary feel — the kanji 熟 ('ripen, mature') + 考 ('think') paints the image of letting thought ripen. The phrase 行くかとどまるか ('whether to go or stay') uses the A-か-B-か disjunction, here as the object of 熟考する with を marking the whole alternative as the thing deliberated. とどまる ('to stop, remain, stay put') is more deliberate and final-feeling than 残る ('remain, be left over').