When the game was over in Boston Tuesday night the Knicks said all the right things. The admitted their flaws that had ruined a fast start and marked disappointing end to a four-game winning streak.

Less than 24 hours later they had a chance to atone for those flaws, to show a lesson learned. And while there were moments, this time the Knicks managed to never give up the early lead, and after a scare, pulled away for a 119-104 win over the Charlotte Hornets at Madison Square Garden.

The Hornets aren’t the Celtics and being at home rather than in Boston helped, too. But mostly it was the Knicks seeming to finally get the wake-up call courtesy of their stars as Karl-Anthony Towns poured in 35 points, capped by a reverse dunk finish of a fast break in the final minutes and grabbed 18 rebounds, while Jalen Brunson added 26 points after struggling Tuesday.

“Teams aren’t just going to lay down,” Brunson said. “We build a lead, you’ve got to anticipate they’re going to fight back, they’re not just going to give up.

“We’ve got to do a better job of slowing down their runs and limiting them. But we can’t let them get all the way back like we’ve been doing. But I think first and foremost, how we respond to that is how we get better as a team. As long as we’re making strides in that direction we’re improving.”

While some of the sluggish play could be attributed to the Knicks being on the back end of a back-to-back set, but that doesn’t explain why they seemed to have more energy in the second half than they did in the second quarter.

The Knicks built a 27-12 lead after the first quarter and upped the lead to as many as 20 early in the second period. But just as they did in Boston Tuesday when they saw an early 14-2 lead evaporate, the Knicks seemed to turn off the things that got them to the lead.

Charlotte closed to within 50-47 before Brunson delivered a buzzer-beating three to secure a six-point lead at the half.

But if that should have been a wake-up call it hardly seemed to take as Mike Brown was forced to take a timeout just 1:45 into the third quarter when Towns buried a three, but the defense opened a lane and LaMelo Ball coasted in for an uncontested layup.

Finally, the Knicks seemed to get back on track with Brunson scoring 12 of his 26 points in the third quarter and Mikal Bridges was 4-for-4 for 9 points in the period. They built the lead back to 90-75 entering the final quarter.

The Knicks stretched the lead to 22, but Charlotte closed within eight with just over four minutes left when Deuce McBride buried a corner three. And after a missed three by Ball, Brunson rushed the ball up court, scoring on a fast-break layup, drawing a foul on the play, to up the lead to 110-96.

Notes & quotes: Mitchell Robinson sat out the second night of the back-to-back set with workload management. … Brown said that OG Anunoby has advanced to some contact in practice sessions.

Steve Popper

Steve Popper covers the Knicks for Newsday. He has spent nearly three decades covering the Knicks and the NBA, along with just about every sports team in the New York metropolitan area.