Show this data after the first pass of the binary search algorithm: {1,52,26,7,23} - {1,26,7,23,52}, Show this data after the second pass of the binary search algorithm: {1,52,6,7,23} - {1,7,23,26,52}, Provide the pros and cons of using a Bubble sort algorithm. - Pros: simple and easily implemented; it doesn't use much memory. Cons: it is a very inefficient or slow especially with large lists., Provide the pros and cons for using the merge sort algorithm. - Pros: It is more efficient than the other two with big data sets; Cons: slow with small data sets; it uses more memory than the other two., Merge these are two sub-lists, to show how the merge sort works: {2,13,45} {12,23} - {2,12,13,23,45}, Which is the quickest of these sorting algorithms for large data sets : Merge; Insertion; Bubble - Merge sort, Describe what abstraction means when applied to computer problems... - Picking out the important bits of information and removing the unnecessary details that don't matter., Describe what decomposition means when applied to computer problems. - Breaking down complex problems down into smaller problems and solving each independently., Name the other form of computational thinking and what does it mean? - Algorithmic Thinking: a logical way of getting from the problem to the solution. Looking at similarities to other similar problems and the algorithms used to implement the solutions and looking for patterns., Explain how the linear search works. - It involves going through every single index in a list, each value stored at the index is then compared to the search value. If it is equal to the search value then the search is finished, if not then the index is increased by one and the new item held in the next index is checked and so on. It means if the object we are looking for at the end of 1000 items then a 1000 comparisons will be needed., The binary search algorithm is known as a divide and ...... algorithm and why is it very efficient? - Conquer, it means after every check the search data is halved., What is the only disadvantage of the binary search algorithm compared to the binary search? - It can operate on unsorted lists., What is the diamond shaped box used for in a flow chart? - Decisions, What does the square rectangular box represent in a flowchart? - Processes, Provide an example of the pseudo-code needed for opening a file, reading it and closing it. - myFile=open("sample.txt") ; myData=myFile.readline(); myFile.close(),
0%
2.1 [Algorithms]
Kongsikan
Kongsikan
Kongsikan
oleh
Skeatsj
Edit Kandungan
Cetakan
Benamkan
Lebih lagi
Tugasan
Papan mata
Terbalikkan jubin
ialah templat terbuka. Ia tidak menjana skor untuk papan mata.
Log masuk diperlukan
Gaya visual
Fon
Langganan diperlukan
Pilihan
Tukar templat
Paparkan semua
Lebih banyak format akan muncul semasa anda memainkan aktiviti.
Buka keputusan
Salin pautan
Kod QR
Padam
Pulihkan autosimpan:
?