Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QSort by most often values

QSort by most often values

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 558 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • EngelardE Offline
    EngelardE Offline
    Engelard
    wrote on last edited by
    #1

    I just start use std::algorithms and QtAlgorithms and can't find something like sort_by_most_often. I have a concept how can i do such stuff for myself, it would take some time to create such algorithm, but i'm 100% sure alot of people did that long before me, and such thing should exist in Qt(or at least in std).

    P.S. google don't help very much..

    1 Reply Last reply
    0
    • E Offline
      E Offline
      Eeli K
      wrote on last edited by Eeli K
      #2

      Must it happen in place (no copy with size of the original container created)? Must the sort be stable (preserving order between equal elements)?

      EngelardE 1 Reply Last reply
      2
      • E Eeli K

        Must it happen in place (no copy with size of the original container created)? Must the sort be stable (preserving order between equal elements)?

        EngelardE Offline
        EngelardE Offline
        Engelard
        wrote on last edited by
        #3

        @Eeli-K said in QSort by most often values:

        container

        sorry, what container?

        I tell at the beginning, i'm new in that algorithms, i can't understand second part of your message at all.

        1 Reply Last reply
        0
        • E Offline
          E Offline
          Eeli K
          wrote on last edited by
          #4

          https://en.cppreference.com/w/cpp/container
          http://doc.qt.io/qt-5/containers.html

          https://en.cppreference.com/w/cpp/algorithm/stable_sort

          1 Reply Last reply
          3

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved