Chris Mullin didn’t change. Not even slightly.

He remained upbeat and positive, refusing to listen to the growing swarm of criticism. He showed up for work every day believing in his players, guaranteeing them their luck would eventually turn if they continued to work hard and listen to the coaching staff.

It turned over the last week, first on Saturday and again Wednesday, in the form of two hard-to-believe upsets of Duke and Villanova, two national championship contenders that were each favored by double-digits and feature a significant number of NBA prospects. Suddenly, the team that was finding new and inventive ways to lose games is somehow figuring out how to beat the best teams in the country. And Mullin, the legendary alum in his third season as coach, has keyed the turnaround.

“[He deserves] all the credit. Coach is [there] for all of our guys,” junior forward Marvin Clark II said shortly after the stunning win over No. 1 Villanova, St. John’s first victory over the top-ranked team in the country since 1985, when Mullin was a player. “All he’s been preaching is, ‘We’re right there, just stay together, stay close. We have opportunities ahead of us. We still have more games to win.’ ”

St. John’s was close during its 0-11 start to Big East play, losing eight games by seven points or less, coming painfully short of upsets of Villanova, No. 5 Xavier, Seton Hall and Creighton, arguably the four best teams in the league. Most importantly, Mullin never let the players see him down despite the difficult setbacks, multiple sources within the program said. He arrived each day with a positive mindset. In film sessions, when he pointed out what was missing, Mullin did so in an encouraging manner. He illustrated how close they were to being a winning team and getting on a roll.

“It’s finally clicking that, ‘Hey make the winning play, box your man out, get the rebound, make free throws,’ ” Clark said. “[Almost] every game we lost we had control of.”

In an effort to get closer to his players in a difficult time, Mullin took the entire team out to lunch two days before the Duke game. No assistant coaches or staff members.

“It was really good for the guys,” a source said.

Mullin has given all the credit to his players, but since he and his staff were taking heat during the long losing streak, they deserve a large portion of the kudos now.

The team’s shot selection and discipline have improved. So has endgame execution and rebounding. The Johnnies beat Villanova on the glass, 35-34, and held their own against Duke.

Wildcats coach Jay Wright believes it’s the result of the experience St. John’s has gotten. Without Marcus LoVett (knee), the Red Storm rely a ton on their starters, and that group included two sophomores (Shamorie Ponds and Justin Simon), two juniors (Clark and Tariq Owens) who have never played such heavy minutes, and a senior (Bashir Ahmed) in just his second year of Division I basketball.

“They just needed time to figure it out in a really good league,” Wright said. “They were in every game. It takes time. You don’t just throw a team together, especially in this league.”

After each of the last two victories, Mullin took the wins in stride. They were very similar to the eight losses, he said, except for a few extra made shots and fewer mistakes. It was like he told his team during the losing streak. They were only a few plays away.

He was thrilled to win the games, but not for himself. For his players, because they never stopped working, never stopped listening to him when it was easy to tune him out. They never fractured.

“It’s a ‘we’ thing here,” Ponds said.

Perhaps that’s a sign of Mullin’s development as a coach.

“You got to give them a lot of credit for sticking together,” Wright said.