Cov txheej txheem:
Video: Qhov twg sorting algorithm yog qhov zoo tshaj plaws hauv qhov phem tshaj?
2024 Tus sau: Lynn Donovan | [email protected]. Kawg hloov kho: 2023-12-15 23:47
Soj ntsuam algorithms
Algorithm | Cov ntaub ntawv qauv | Sijhawm nyuaj : phem tshaj |
---|---|---|
Ceev ceev | Array | O(n2) |
Sib koom ua ke | Array | O(n log(n)) |
Heap kev | Array | O(n log(n)) |
Yooj yim | Array | O(n log(n)) |
Yog li ntawd, hom twg yog qhov zoo tshaj plaws hauv qhov phem tshaj?
Quicksort feem ntau yog qhov ceev tshaj plaws, tab sis yog tias koj xav tau lub sijhawm phem tshaj plaws, sim Heapsort lossis Mergesort . Ob leeg no muaj O (n log n) ua haujlwm tsis zoo.
Ib yam li ntawd, qhov kev txheeb xyuas algorithm twg muaj qhov teeb meem tsawg tshaj plaws phem tshaj plaws? Sib koom ua ke
Hais txog qhov no, qhov twg algorithm yog qhov zoo tshaj plaws rau kev txheeb xyuas?
Quicksort
Yuav ua li cas koj pom qhov phem tshaj plaws thiab cov ntaub ntawv zoo tshaj plaws ntawm ib qho algorithm?
Hauv cov ntsiab lus yooj yim tshaj plaws, rau qhov teeb meem uas qhov loj me yog n:
- Cov ntaub ntawv zoo tshaj plaws = lub sijhawm ceev tshaj plaws kom tiav, nrog rau kev pom zoo xaiv. Piv txwv li, rooj plaub zoo tshaj plaws rau kev txheeb xyuas algorithm yuav yog cov ntaub ntawv uas twb tau txheeb xyuas lawm.
- Cov ntaub ntawv phem tshaj = lub sijhawm qeeb tshaj plaws los ua kom tiav, nrog cov khoom siv pessimal xaiv.
- Average case = tus lej lej.
Pom zoo:
Qhov Net ceev twg yog qhov zoo tshaj plaws hauv Is Nrias teb?
Hauv qhov kev tshawb fawb tshiab tshaj plaws uas ua los ntawm lub tuam txhab thoob ntiaj teb speedtest Ookla, Airtel tau tawm los ua Is Nrias teb tus ceev tshaj 4Gnetwork nrog qhov nruab nrab ceev ntawm 11.23 Mbps. Vodafone los ua tus thib ob ceev tshaj plaws 4G muab kev pab cuam, nrog nruab nrab speeds li ntawm 9.13 Mbps
Dab tsi sorting algorithm muaj qhov zoo tshaj plaws asymptotic complexity?
Heap Sib Ib yam li ntawd, qhov kev txheeb xyuas algorithm twg muaj lub sijhawm zoo tshaj plaws? Rau qhov zoo tshaj plaws Insertion Cai thiab Heap Sib yog qhov zoo tshaj plaws raws li lawv cov ntaub ntawv zoo tshaj plaws khiav lub sij hawm nyuaj yog O (n).
Lub algorithm twg yog qhov zoo tshaj plaws rau kev kuaj lub ntsej muag?
Hais txog kev ceev, HoG zoo li yog qhov ceev tshaj plaws algorithm, ua raws li Haar Cascade classifier thiab CNNs. Txawm li cas los xij, CNNs hauv Dlib zoo li yog qhov tseeb tshaj plaws algorithm. HoG ua tau zoo heev tab sis muaj qee qhov teeb meem txheeb xyuas lub ntsej muag me me. HaarCascade Classifiers ua tau zoo ib yam li HoG tag nrho
Qhov twg yog txoj hauv kev zoo tshaj plaws los tshaj tawm tias koj nplooj ntawv siv html5 raws tu qauv?
HTML Zoo tshaj / Txoj hauv kev kom tshaj tawm tias koj nplooj ntawv siv HTML5 raws tu qauv Zoo tshaj / txoj kev tshaj tawm uas lus rau koj paj yog lus Askiv Zoo tshaj / txoj kev raug tsim meta-data rau koj paj Tsis tas li ntawd, qhov tseeb doctype nqe lus rau html5 yog dab tsi?
Dab tsi yog qhov teeb meem phem tshaj plaws thiab qhov teeb meem nruab nrab nyuaj ntawm binary nrhiav ntoo?
Binary search tree Algorithm Qhov nruab nrab qhov phem tshaj qhov chaw O(n) O(n) Nrhiav O(log n) O(n) Ntxig O(log n) O(n) Rho tawm O(log n) O(n)