<prompt> Ka lebaka la bothata, etsa algorithm ea ho bo rarolla.Ho fanoe ka lethathamo la linomoro tsa n, fumana kakaretso ea kakaretso ea likarolo tse latellanang lethathamong.  <response>: Instruction in English: Given a problem, design an algorithm to solve it. . Response in English: Here is a step-by-step algorithm to solve the given problem:1. Initialize a variable, max_sum, to store the maximum sum of consecutive elements, and set its value equal to the first element of the array.2. Initialize another variable, current_sum, to store the current sum of consecutive elements, and set its value equal to the first element of the array.3. Iterate over the array from the second element to the end: a. If the value of current_sum is positive, add the current element to it, else set the value of current_sum equal to the current element. b. Compare current_sum with max_sum and update the value of max_sum if current_sum is greater than max_sum.4. Return max_sum as the maximum sum of consecutive elements in the array.This is the well-known Kadanes Algorithm, with a time-complexity of On that solves the problem of finding the maximum sum of a subarray in a given one-dimensional array. . Response in Sesotho: Mona ke algorithm ea mohato ka mohato ho rarolla bothata bo fanoeng: 1. Qala ho feto-fetoha, max_sum, ho boloka kakaretso ea kakaretso ea likarolo tse latellanang, le ho beha boleng ba eona bo lekanang le karolo ea pele ea sehlopha. 2. Qala phetoho e ngoe, current_sum, ho boloka kakaretso ea hona joale ea likarolo tse latellanang, me u behe boleng ba eona bo lekanang le karolo ea pele ea sehlopha. 3. Pheta holima lethathamo ho tloha karolong ea bobeli ho isa qetellong: a. Haeba boleng ba current_sum bo le positive, kenya elemente ea hajoale ho eona, ho seng joalo beha boleng ba current_sum bo lekanang le element ea hajoale. b. Bapisa current_sum le max_sum me u nchafatse boleng ba max_sum haeba current_sum e le kholo ho feta max_sum. 4. Khutlisetsa max_sum e le kakaretso ea kakaretso ea likarolo tse latellanang. Ena ke Algorithm e tsebahalang ea Kadane, e nang le nako e rarahaneng ea On e rarollang bothata ba ho fumana kakaretso ea palo e kholo ea sehlopha sa sehlopha se le seng. 