摘要:In recent times, e-learning has become indispensable for both technical and general education. Among all the subjects, programming education has drawn attention because of its importance for continuous development in the ICT sector. Finding errors in a solution code is a laborious task for novice programmers, teachers and instructors. Novice programmers are spending a lot of valuable time to search errors in the solution codes. In this paper, a method for the categorization of frequent errors in solution codes is presented. In the proposed method, the differences between wrong solutions and accepted solutions are used to define feature vectors for a clustering algorithm. A longest common subsequence (LCS) algorithm is leveraged to find the differences between wrong and accepted codes, then all the inequalities are converted into feature vectors. The k-mean clustering algorithm is applied to cluster the elements of the feature vector to find the most common errors in solution codes. In our experiment, the method was applied to a set of program solution codes accumulated in an e-learning system. Experimental results show that the proposed method is efficient and capable to detect the most common errors occurred in solution codes that can be helpful for novice programmers to resolve errors quickly as well as useful for teachers to prepare lesson plan.