InterviewSolution
| 1. |
A data compression software utilizes various steps to compress a string of data. One of the steps involves finding the count of characters that are not repeated in the string. Write an algorithm for the software developer to find the count of characters that are not repeated in the string. |
|
Answer» Solution - We Have , \begin{gathered} \large \sf{a_{5} +a_{7} = 52}\\ \\ \large \sf{ = a + 4d + a + 6d= 52}\\ \\ \large \sf2a + 10d \: \: - - - (1)\\ \\ \large \sf{a_{11} = a + 10d = 46} \\ \\ \end{gathered} a 5
+a 7
=52 =a+4d+a+6d=52 2a+10d−−−(1) a 11
=a+10d=46
♠ Multiplying Both Sides by 2 : \begin{gathered}\large :\longmapsto\sf 2a + 20d = 92\: \: - - - (2) \\ \end{gathered} :⟼2a+20d=92−−−(2)
♠ Subtracting (1) From (2) , We GET :- \begin{gathered}\sf10d = 40 \\ \\ \sf d = \CANCEL{\frac{40}{10} }\\ \\ \purple{ \Large :\longmapsto \underline {\boxed{{\bf d = 4} }}}\end{gathered} 10d=40 d= 10 40
:⟼ d=4
|
|