I am beginner in running (started running 3 weeks before) and I wonder if I am on the right track :

My goal is to cover more distance in the same amount of time , but at the same time taking less walking breaks in between . Currently I am running 5k in 35-40min .

For the first 3Km-3.5km running is not an issue . I run about 9 km/hr - 10km/hr .

The next 1.5 km becomes difficult to run at a single stretch . So I (this is what i am currently doing) run at 9km/hr-10km/hr for 2 min with 1 minute breaks and the final stretch is for 3 minutes (plus bonus 100 m slow walk). These short runs are of total 10-12 minutes.

Now should i continue with what i just wrote above or should I run slow say about 7.5km/hr-8km/hr for longer duration (6 minutes) with 1 minute of walk in between?