The intervals in a major scale are really the same as a minor scale. What’s different is the starting point. All the pitches in a major scale are the same as its relative minor, which is down a minor third. So the difference between a melody in a minor key and a major one is the root note. The same melody can be minor or major depending on the perspective of the listener. The last pattern I posted is only in a minor key if you consider C the root. If you consider E flat the root, then the melody is in a major key with C being its relative minor. In this case, the pattern is in C major, so if you listen with an A (the relative minor of C) in mind you’ll hear it in a minor scale.
GMS Major Scale