مَرَرْتُ بِقَاضٍ
Translation: I passed by a judge.
مَرَرْتُ: past verb with subject tāʾ.
بِـ: preposition; قَاضٍ: genitive noun with estimated kasra on its underlying yāʾ, which is omitted in the indefinite form.
Contrast: The same written form was nominative in جَاءَ قَاضٍ; the preposition makes it genitive here.