CHARLOTTE, N.C. — It’s been almost four years since “Linsanity” swept through New York and the NBA, and Jeremy Lin provided the Knicks a little reminder of it Saturday night.

Lin led the depleted Charlotte Hornets with 26 points, five rebounds and five assists in a 97-84 victory over the Knicks at Time Warner Cable Arena. His hair looks a little different, but it was the same mix of dashing drives to the basket and jump shots that had Knicks fans in a frenzy when Lin burst on to the national scene in February 2012.

Lin was in the starting lineup because the Hornets were without five rotation players, including starters Nicolas Batum and Al Jefferson.

“Jeremy Lin has played on teams where he has started for the majority of the year,” Hornets coach Steve Clifford said. “I think the guys that have had those roles before are a big advantage because they have done it before.”

Carmelo Anthony had a quiet night with nine points, 4-for-11 shooting and six rebounds. He was taken out of the game with 2:55 left in the third quarter and did not play in the fourth because of a sore knee. Anthony passed Gary Payton and became No. 30 on the NBA career scoring list.

Anthony said the knee was bothering him before Friday night’s game against the Clippers at the Garden and is not a long-term concern.

advertisement | advertise on newsday

“Yesterday I felt just kind of, I wasn’t there physically,” he said. “Even in the shootaround yesterday, I was trying to get myself going for the game last night. Coming into tonight’s game, I actually went out there before the game to try and get warm and get loose. As the game went on, there were just certain things that I’d normally be able to do and moves I’d normally be able to make that I wasn’t able to.”

“I don’t know if he would have come back in the game without the sore knee,” Knicks coach Derek Fisher said of Anthony. “We just weren’t playing with enough energy. We just looked completely worn down and worn out.”

Derrick Williams had 19 points and 14 rebounds off the bench, but poor outside shooting and turnovers doomed the Knicks. He keyed a surge early in the fourth quarter with seven quick points, and a three-pointer by Kristaps Porzingis cut Charlotte’s lead to 11 with a little more than eight minutes left. But with a chance to get the deficit to single digits, Porzingis missed from the same spot on the next possession, and the Hornets’ Kemba Walker (26 points) sliced through the lane for a three-point play to end the rally.

Lin had 11 points in the third quarter as the Hornets stormed to a 21-point lead, thanks to a 32-point outburst. The Knicks tried multiple defenders on him but couldn’t keep Lin from getting to the hoop and the free-throw line, where he made all 10 of his attempts.

Lin and PJ Hairston (20 points, 10 rebounds) led the charge early in the third quarter before Walker finally found his shooting touch. This was the third time Lin has scored at least 20 against the Knicks since signing with the Rockets as a free agent.