Lung cancer is defined as an uncontrolled cell growing in the tissues of lung, which is also said to be lung tumor. The lung cancer is curable in the starting stage, but identifying the lung cancer in starting stage is very difficult. In recent decades, researchers showed great interest on gene level lung cancer identification using shortest path between the lung cancer related genes. Many research has been done to identify the shortest path between the genes, but the conventional methods consumes more time for processing the data. In this research, Protein to Protein Interaction (PPI) structure is constructed from the weighted protein present in the Search Tool for the Retrieval of Interacting Genes/Proteins (STRING) database. For identifying the shortest path between the genes in PPI, an effective algorithm: enhanced Floyd warshall algorithm is proposed. Floyd warshall is efficient in finding the shortest path between the genes and also solves all pairs of shortest path problem. A major drawback of Floyd warshall algorithm is, it works slower than other conventional algorithms designed to perform the same task. To improve the performance of traditional Floyd warshall algorithm, an iterative matrix is used for eliminating the invalid path. Then, the comparison between the proposed method and existing system is given in the experimental result. Experimental outcome shows that the proposed approach improved the time consumption up to 2-3 sec compared to the existing methods: Dijkstra's algorithm and Floyd warshall algorithm.Keywords: Dijkstra's algorithm, Enhanced Floyd warshall algorithm, Protein to protein interaction, Search tool for the retrieval of interacting genes/proteins.