I am an undergrad at a top 5 research institution for context, and this is pertaining to math Ph.D. admissions.
I know looking at grades in isolation w.r.t. admissions is a questionable thing to do in the first place, but from an admissions perspective, are difficult classes valued over perfect grades? I guess the example in mind would be, is it better to have a couple of difficult courses + mostly undergrad courses with all As, or a lot of difficult classes but some Bs sprinkled in?