Calculating Time complexity:Let say the iteration in Binary Search ter translation - Calculating Time complexity:Let say the iteration in Binary Search ter Indonesian how to say

Calculating Time complexity:Let say

Calculating Time complexity:Let say the iteration in Binary Search terminates after k iterations. In the above example, it terminates after 3 iterations, so here k = 3At each iteration, the array is divided by half. So let’s say the length of array at any iteration is nAt Iteration 1,Length of array = nAt Iteration 2,Length of array = n⁄2At Iteration 3,Length of array = (n⁄2)⁄2 = n⁄22Therefore, after Iteration k,Length of array = n⁄2kAlso, we know that afterAfter k divisions, the length of array becomes 1ThereforeLength of array = n⁄2k = 1=> n = 2kApplying log function on both sides:=> log2 (n) = log2 (2k)=> log2 (n) = k log2 (2)As (loga (a) = 1)Therefore,=> k = log2 (n)Hence, the time complexity of Binary Search islog2 (n)
0/5000
From: -
To: -
Results (Indonesian) 1: [Copy]
Copied!
Menghitung kompleksitas Waktu: <br><br>Mari mengatakan iterasi di Binary Search berakhir setelah iterasi k. Dalam contoh di atas, itu berakhir setelah 3 iterasi, jadi di sini k = 3 <br>Pada setiap iterasi, array dibagi dengan setengah. Jadi katakanlah panjang array di iterasi apapun n <br>Pada Iterasi 1, <br>Panjang array = n <br>Pada Iterasi 2, <br>Panjang array = n/2 <br>Pada Iterasi 3, <br>Panjang array = (n/2) /2 = n/ 22 <br>Oleh karena itu, setelah Iterasi k, <br>panjang array = n/2k <br>Juga, kita tahu bahwa setelah <br>setelah divisi k, panjang array menjadi 1 <br>Oleh karena itu <br>panjang array = n/2k = 1 <br>=> n = 2k <br>Menerapkan fungsi log pada kedua sisi: <br>=> log2 (n) = log2 (2k)<br>=> Log2 (n) = k log2 (2) <br>As (loga (a) = 1) <br>Oleh karena itu, <br>=> k = log2 (n) <br>Oleh karena itu, kompleksitas waktu dari Binary Search adalah <br><br>log2 (n)
Being translated, please wait..
Results (Indonesian) 2:[Copy]
Copied!
Kompleksitas waktu menghitung:<br><br>Katakanlah iterasi dalam pencarian biner berakhir setelah iterasi k. Dalam contoh di atas, itu berakhir setelah 3 iterasi, jadi di sini k = 3<br>Pada setiap iterasi, array dibagi dengan setengah. Jadi Katakanlah panjang larik pada iterasi apapun adalah n<br>Pada iterasi 1,<br>Panjang array = n<br>Pada iterasi 2,<br>Panjang larik = n ⁄ 2<br>Pada iterasi 3,<br>Panjang larik = (n ⁄ 2) ⁄ 2 = n ⁄ 22<br>Oleh karena itu, setelah iterasi k,<br>Panjang larik = n ⁄ 2k<br>Juga, kita tahu bahwa setelah<br>Setelah Divisi k, panjang array menjadi 1<br>Karenanya<br>Panjang larik = n ⁄ 2k = 1<br>= > n = 2k<br>Menerapkan fungsi log pada kedua sisi:<br>= > log2 (n) = log2 (2k)<br>= > log2 (n) = k log2 (2)<br>Sebagai (loga (a) = 1)<br>Karenanya<br>= > k = log2 (n)<br>Oleh karena itu, kompleksitas waktu dari pencarian biner<br><br>log2 (n)
Being translated, please wait..
Results (Indonesian) 3:[Copy]
Copied!
Being translated, please wait..
 
Other languages
The translation tool support: Afrikaans, Albanian, Amharic, Arabic, Armenian, Azerbaijani, Basque, Belarusian, Bengali, Bosnian, Bulgarian, Catalan, Cebuano, Chichewa, Chinese, Chinese Traditional, Corsican, Croatian, Czech, Danish, Detect language, Dutch, English, Esperanto, Estonian, Filipino, Finnish, French, Frisian, Galician, Georgian, German, Greek, Gujarati, Haitian Creole, Hausa, Hawaiian, Hebrew, Hindi, Hmong, Hungarian, Icelandic, Igbo, Indonesian, Irish, Italian, Japanese, Javanese, Kannada, Kazakh, Khmer, Kinyarwanda, Klingon, Korean, Kurdish (Kurmanji), Kyrgyz, Lao, Latin, Latvian, Lithuanian, Luxembourgish, Macedonian, Malagasy, Malay, Malayalam, Maltese, Maori, Marathi, Mongolian, Myanmar (Burmese), Nepali, Norwegian, Odia (Oriya), Pashto, Persian, Polish, Portuguese, Punjabi, Romanian, Russian, Samoan, Scots Gaelic, Serbian, Sesotho, Shona, Sindhi, Sinhala, Slovak, Slovenian, Somali, Spanish, Sundanese, Swahili, Swedish, Tajik, Tamil, Tatar, Telugu, Thai, Turkish, Turkmen, Ukrainian, Urdu, Uyghur, Uzbek, Vietnamese, Welsh, Xhosa, Yiddish, Yoruba, Zulu, Language translation.

Copyright ©2025 I Love Translation. All reserved.

E-mail: