+ Reply to Thread
Results 1 to 1 of 1
  1. [C++]Interclasarea a 2 vectori

    #1
    Moderator:
    Programare
    ~Wolf~'s Avatar
    Member since
    Jan 2017
    Location
    Dark abyss
    Posts
    3,078
    Last username
    GaBiTzU M@riju@n@ |Wolf| WarGods | Wolf
    Mentioned
    39 Post(s)
    Achievements Visitor Messages Given 1 Days Registered 3 Mentions Received 1 Mentions Given 2 Mentions Given 1 Visitor Messages Received 2 Visitor Messages Received 1 Total Posts 3
    Doneaza
    Sustine Comunitatea WarGods!
    Fii unul de-al nostru! Doneaza
    Doneaza in Cont Bancar
    Click aici pentru a face o Donatie

    [C++]Interclasarea a 2 vectori

    Algoritm pentru interclasarea a 2 vectori

    Revin cu un nou tutorial.Multa inactivitate, da, da, stiu.Apropo, pentru nelamuriri/greseli va rog sa lasati PM sau reply.

    Ce inseamna interclasarea a 2 vectori?

    In primul rand, ce trebuie sa stiti este ca ambii vectori necesita sa fie obligatoriu ordonati crescator sau descrescator.Acest algoritm sorteaza cei doi vectori in ordine crescatoare sau descrescatoare.

    Stiu deja algoritmul de sortare, nu imi trebuie interclasarea ca sa sortez 2 vectori

    Big NO, in cazul in care vi se cere eficienta.Vedeti voi, sortarea se face in O(n^2), pe cand interclasarea in O(n), fiind foarte vizibila eficienta sa.

    *insa de ce nu, daca nu vi se cere eficienta puteti face sortare

    Interclasarea a 2 vectori -> Ordine crescatoare
    C++ Code:
    You have to register to be able to see this link. Register HERE! If you are already a member please log in! If you still you are not able to see the link you need to activate your account or an administrator need to activate your account!


    Exemplu:
    Code:
    You have to register to be able to see this link. Register HERE! If you are already a member please log in! If you still you are not able to see the link you need to activate your account or an administrator need to activate your account!
    Se va afisa:
    Code:
    You have to register to be able to see this link. Register HERE! If you are already a member please log in! If you still you are not able to see the link you need to activate your account or an administrator need to activate your account!
    Explicatie:
    Code:
    You have to register to be able to see this link. Register HERE! If you are already a member please log in! If you still you are not able to see the link you need to activate your account or an administrator need to activate your account!
    Last edited by ~Wolf~; 26-10-2020 at 10:20 AM.
    Tutoriale C++: CLICK AICI

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Partners
Humble Monthly Bundle
Voucher PC-Garage