Knicks' Trey Burke (23) is fouled as he drives against...

Knicks' Trey Burke (23) is fouled as he drives against Charlotte Hornets' Dwight Howard (12) during the second half of an NBA basketball game in Charlotte, N.C., Monday, March 26, 2018. Credit: AP / Chuck Burton

CHARLOTTE, N.C. — Trey Burke’s game was influenced by Allen Iverson, and the Knicks point guard showed some AI-like moves and shots Monday night.

Displaying his entire repertoire of crossovers and step-back shots in only his second start of the season, Burke enjoyed his best night as a pro and the best by a Knicks guard in 13 years. He had a career-high 42 points and 12 assists in the Knicks’ 137-128 overtime loss to the Hornets.

“He’s been playing great,” Jeff Hornacek said. “He’s a hard guy to guard one-on-one. He seems to be able to get a shot off any time he wants. He played a great game.”

It was a remarkable shooting display by Burke and Hornets point guard Kemba Walker, who had 31 points. Walker hit a tying three-pointer with 20.8 seconds left in regulation and scored 20 in the fourth quarter and overtime, 11 in the extra period.

The game also featured a strange occurrence, considering it was a close game and the way the Knicks’ season has gone. Hornacek let Tim Hardaway Jr. design a play in the huddle in the fourth quarter. He drew it up for — who else — Burke, and he hit an elbow jumper.

“Guys were having fun,” Hornacek said. “We were just trying to keep them loose. Guys have been playing as hard as they can. I’ve been very happy with how they’re playing. Just trying to keep them loose a little bit in the game. That play worked. We got a shot, so I said, ‘Good call, Tim.’ ”

Burke continued to prove he’s the best point guard on the Knicks’ roster. He shot 19-for-31, scored 35 points after halftime and became the first Knicks guard to post at least 40 points and 10 assists since Stephon Marbury on March 29, 2005.

It’s incredible to think that Burke wasn’t in the league until the Knicks signed him in January. He had been playing in the G League. But Burke has been the Knicks’ best player recently. “It’s nothing new to me. I’ve been seeing him doing this since we were at Michigan,” said Hardaway, Burke’s college teammate. “He’s meant to be here. He’s supposed to be here. He’s not a G League player. He’s an NBA ballplayer. He showed that tonight.”

Burke has a partially guaranteed contract for 2018-19. Right now, though, the Knicks (27-48) have to consider him the starting point guard going into next season. They still could look to acquire one in the offseason, but he has shown he has staying power.

“I’m not even thinking about this [is] a shot or this is the opportunity,” Burke said. “I’m just playing . . . Talent-wise, everybody will vouch I always had the talent to play in the league. Mentally is where I could improve. I think mentally is where I matured over the last year or so.”

The Knicks were short on point guards Monday night. Frank Ntilikina fouled out in 18 minutes with 12 points and Emmanuel Mudiay didn’t play because of an illness, so Burke wound up logging 41 minutes.

Hardaway’s three-pointer gave the Knicks a 117-114 lead with 39.8 seconds left in regulation before Walker’s three-pointer tied it. That upset Hardaway because with a three-point lead, the Knicks didn’t force him to drive. He called it “unacceptable and really frustrating.”

The Knicks could have called a timeout and designed a play, but Burke waved off Hornacek on the timeout. He wanted to finish the game.

Burke also waved off a screen by Luke Kornet and tried to take Walker one-on-one. After losing his dribble, Burke recovered it, but his contested three-pointer over Walker didn’t reach the rim as the buzzer sounded.

“In those situations, I feel like we can be special, we can make a play happen,” Burke said. “I should have called the guy to set a screen just to see what opened up. It’s something I can learn from, I can watch and get better from.”

Michael Beasley scored 27 points, Hardaway added 17 and Enes Kanter had 15 points and 13 rebounds. The Knicks trailed by 17 in the first half, but Beasley and Burke totaled 28 points in a 33-point third quarter. They finished with 68 in the second half.