Enhancing the accuracy of indoor visible light positioning systems with simple, real-time, and stable methods is one of the interesting challenges in recent research. In this paper, a relatively minor mean positioning error of 8 mm and a 42-52% improvement in computational time could be achieved within a real space of 1.2 m x 1.2 m x 1.2 m by transcending the serious limitations of the traditional knearest neighbors (KNN) algorithm. These disadvantages (slow execution time, high error formation) are a result of finding the nearest neighbors from all the fingerprints, averaging the Euclidean distances, and the excessive passivity of the K value. To overcome the above limitations of KNN, we proposed a maximum received signal strength recognition (MRR) technique and weighted optimum KNN (WOKNN) algorithm, which is a combination of optimum KNN (OKNN) and weighted KNN (WKNN). While MRR was used to reduce the computational time, WOKNN was used to solve the remaining problems. Specifically, OKNN was used to automatically determine the best number of nearest neighbors for each position in the area under consideration, and WKNN helped improve the errors that come from the Euclidean distance averaging process. Based on positive experimental results and a meaningful comparison with various versions of KNN, we demonstrated that the improved conventional KNN algorithm can achieve very high positioning accuracy and is totally suitable for several specific 2-D indoor positioning applications.