<prompt> Etsa algorithm ho tsebahatsa tatelano e telele ka ho fetisisa e tloaelehileng ka likhoele tse peli.Khoele A: ABCDGH String B: AEDFHR  <response>: Instruction in English: Make an algorithm to identify the longest common subsequence in two strings. . Response in English: One of the most efficient algorithms to find the Longest Common Subsequence LCS between two strings is the dynamic programming approach. Heres how the algorithm works given the input strings A and B. Algorithm 1. First, create a two-dimensional matrix L of size m1, n1, where m and n are the lengths of the two input strings. The rows represent the characters of string A while the columns represent the characters of string B.2. Initialize the first row and first column of the matrix L with zeros, as there cant be any common subsequence of zero-length strings.3. For the remaining cells, iterate through the matrix row by row, starting from the second row and second column: a. If the characters represented by the current row and column are the same, add one to the diagonal cell value and store that in the current cell. b. Else, assign the maximum value of the adjacent cells on the left and top of the current cell. 4. The bottom-right cell of the matrix will contain the length of the LCS.5. To retrieve the LCS, start from the bottom-right cell and traverse the matrix backwards. If the current cell value is not the same as any of its adjacent left or top cell values, the character represented by the cell is part of the LCS. Move diagonally up to the next cell. a. Else, move to the adjacent cell with the highest value. b. Repeat the process until the leftmost or topmost rowcolumn is reached.pythondef longest_common_sequenceA: str, B: str: m, n lenA, lenB L 0 for x in rangen 1 for x in rangem 1 for i in range1, m1: for j in range1, n1: if Ai-1 Bj-1: Lij Li-1j-1 1 else: Lij maxLi-1j, Lij-1 index Lmn lcs index1 lcsindex i m j n while i . Response in Sesotho: ngoe ea li-algorithms tse sebetsang hantle haholo tsa ho fumana Longest Common Subsequence LCS lipakeng tsa likhoele tse peli ke mokhoa o matla oa ho etsa mananeo. Mona ke kamoo algorithm e sebetsang kateng ho latela likhoele tsa A le B. Algorithm 1. Ntlha ea pele, theha matrix a mahlakore a mabeli L ea boholo m1, n1, moo m le n e leng bolelele ba likhoele tse peli tsa ho kenya. Mela e emela litlhaku tsa khoele A ha litšiea li emela litlhaku tsa B. 2. Qala mola oa pele le kholomo ea pele ea matrix L ka li-zero, kaha ho ke ke ha ba le lithapo tse tloaelehileng tsa likhoele tsa bolelele ba zero. 3. Bakeng sa lisele tse setseng, pheta-pheta ka mola oa matrix ka mola, ho qala ho tloha moleng oa bobeli le kholomong ea bobeli: a. Haeba litlhaku tse emeloang ke mola le kholomo ea hona joale li tšoana, eketsa e le ngoe ho boleng ba sele ea diagonal me u boloke seo seleng ea hajoale. b. Ho seng joalo, fana ka boleng bo phahameng ba lisele tse haufi ka ho le letšehali le ka holimo ho sele ea hona joale. 4. Sele e ka tlase ho le letona ea matrix e tla ba le bolelele ba LCS. 5. Ho lata LCS, qala ho tloha ka tlase ho le letona me u tšele matrix morao. Haeba boleng ba hona joale ba sele bo sa tshwane le boleng bofe kapa bofe bo bapileng le le letshehadi kapa hodimo, tlhaku e emetsweng ke sele ke karolo ya LCS. Tsamaisa ka diagonally ho ea seleng e latelang. a. Ho seng joalo, suthela seleng e haufi ka boleng bo holimo. b. Pheta mokhoa ona ho fihlela molakholomo e ka ho le letšehali kapa holimo-limo e fihletsoe. python def longest_common_sequenceA: str, B: str: m, n lenA, lenB L 0 bakeng sa x letotongn 1 bakeng sa x molengm 1 bakeng sa i ka lethathamong1, m1: bakeng sa j moeling1, n1: haeba Ai-1 Bj-1: Lij Li-1j-1 1 e ngoe: Lij maxLi-1j, Lij-1 index L mn lcs index1 lcsindex i mj n ha ke ntse ke 