Array of objects Algorithms - Search, Sort, Reverse, Max, Min, Custom methods

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 ธ.ค. 2024

ความคิดเห็น • 56

  • @CodeBeauty
    @CodeBeauty  ปีที่แล้ว +15

    📚 Learn programming with these Free E-Books ⬇
    C++ Lambdas e-book - free download here: bit.ly/freeCppE-Book
    Entire Object-Pascal step-by-step guide - free download here: bit.ly/FreeObjectPascalEbook
    🚀📈💻🔥 My Practical Programming Course: www.codebeautyacademy.com/
    Experience the power of practical learning, gain career-ready skills, and start building real applications!
    This is a step-by-step course designed to take you from beginner to expert in no time!
    💰 Here is a coupon to save 10% on your first payment (CODEBEAUTY_YT10).
    Use it quickly, because it will be available for a limited time.

  • @milkamilkica1935
    @milkamilkica1935 ปีที่แล้ว +7

    I'm a student and you're the only reason why I get good grades on my exams

  • @codeoasis1180
    @codeoasis1180 ปีที่แล้ว +5

    best explanation of arrays and algorithms on that i could find on youtube

    • @CodeBeauty
      @CodeBeauty  ปีที่แล้ว

      always good to hear :D

  • @dundyd3612
    @dundyd3612 ปีที่แล้ว +3

    I'm so happy that I found your channel. I can honesty say that you changed my life ❤❤

  • @hilgicamala2520
    @hilgicamala2520 ปีที่แล้ว +2

    thank you saldina, this is the video that I've been searching for

  • @phoebewell3653
    @phoebewell3653 ปีที่แล้ว +3

    I love the task at the end of the video. Very good for practicing

    • @CodeBeauty
      @CodeBeauty  ปีที่แล้ว

      Glad you liked it!

  • @amelccc
    @amelccc ปีที่แล้ว +6

    great job as always 👌👌

  • @eliasrodriues6614
    @eliasrodriues6614 ปีที่แล้ว +4

    Beautiful and smart teacher

  • @muatzdaw8283
    @muatzdaw8283 ปีที่แล้ว +1

    The best teacher ever, thank you for making anything easy 🤗🤗

    • @CodeBeauty
      @CodeBeauty  ปีที่แล้ว

      You're very welcome!

  • @Alain-g8z
    @Alain-g8z ปีที่แล้ว +3

    I am sure it is going to be amazing class

  • @Sam-k1i2i
    @Sam-k1i2i ปีที่แล้ว +4

    right on point, as usual, clear and concise, precious :)

  • @MilesGerome
    @MilesGerome ปีที่แล้ว +3

    great job, thank you Saldina, this is very helpful

  • @marym9003
    @marym9003 ปีที่แล้ว +2

    this video is a treasure

  • @OzzFan1000
    @OzzFan1000 ปีที่แล้ว +2

    The tips about using pass by reference was most helpful to me. I need to play around with that some more to fully understand it. Thanks!

    • @CodeBeauty
      @CodeBeauty  ปีที่แล้ว +1

      Certainly, practice is everything and curiosity is always rewarded (in programming at least :D)

  • @austineodhiambo4095
    @austineodhiambo4095 ปีที่แล้ว +1

    You always inspire me through programming.

  • @deanmorrison6254
    @deanmorrison6254 ปีที่แล้ว +4

    very helpful, thank you so much

    • @CodeBeauty
      @CodeBeauty  ปีที่แล้ว

      You're so welcome!

  • @valjo02
    @valjo02 ปีที่แล้ว +2

    Excellent explanation and very good homework . Keep up doing new videos Saldina. I am very keen on programming 👍

    • @CodeBeauty
      @CodeBeauty  ปีที่แล้ว +1

      Use this link to sign up for my practical programming course and I will send you notification with the discount once it is published. I gave my best to make it as good as possible :)
      Cheers.

  • @raohammadraza
    @raohammadraza ปีที่แล้ว

    superb Teacher thanks you so much.
    Great job good teaching method

  • @Alexander-iq5yq
    @Alexander-iq5yq 9 หลายเดือนก่อน

    I am curious how "sort(students, student+5, compareByGrade)" works when compareByGrade would seem only to compare one element to the next. It would require many passes to sort the data, right? Is that what is happening automatically behind the scenes in sort(), or do I not understand?

  • @bicycleninja1685
    @bicycleninja1685 ปีที่แล้ว

    Thanks, anything regarding data wrangling is interesting to me

  • @nv9usb381
    @nv9usb381 ปีที่แล้ว +5

    Saldina should be grade 10 in the example 🥰

  • @hsngraphics8228
    @hsngraphics8228 ปีที่แล้ว +1

    thanks for your support

  • @georgebentley-ricardo9445
    @georgebentley-ricardo9445 ปีที่แล้ว

    Huge thumbs up 🤠👍

  • @ktoscos4546
    @ktoscos4546 ปีที่แล้ว +1

    Name of channel match perfectly

    • @CodeBeauty
      @CodeBeauty  ปีที่แล้ว

      Thank you 🥰❤️

  • @nissum5179
    @nissum5179 ปีที่แล้ว

    After completing your video, something is definitely hard but its not the concept of array 😳❤

  • @LakshmiM-f6k
    @LakshmiM-f6k ปีที่แล้ว +1

    Hi saldina.. Any idea of starting advanced topics like mutex, semaphores, process sync topics? Most awaiting.

    • @CodeBeauty
      @CodeBeauty  ปีที่แล้ว

      I just added all of these topics to my too list. Thanks for the suggestions 🥰

  • @nevram0101
    @nevram0101 ปีที่แล้ว +1

    Thankyou

    • @CodeBeauty
      @CodeBeauty  ปีที่แล้ว

      You’re welcome 😊

  • @muhmedgamal5841
    @muhmedgamal5841 6 หลายเดือนก่อน

    thank you

  • @avion85
    @avion85 ปีที่แล้ว

    Here's a new video idea: the same topics but using modern C++ features like ranges and lambdas. It would make for a nice contrast while making the code smaller, simpler and safer.

  • @omerhusen906
    @omerhusen906 ปีที่แล้ว +3

    ❤❤

  • @dvongrad
    @dvongrad ปีที่แล้ว

    Other things to consider in searching and sorting are what to do if multiple students with the same name exist in a search, searching for grades above or below a certain value, and secondary sorts like descending grades sorted alphabetically by name for grades that occur more than once. Perhaps these concepts are beyond the scope of "beginner" tutorials...

  • @keilooks
    @keilooks 5 หลายเดือนก่อน

    Is this code available?

  • @omarious
    @omarious ปีที่แล้ว +2

    Saldana has 7.2 and Alice has 10. Alice’s score was updated.

    • @CodeBeauty
      @CodeBeauty  ปีที่แล้ว +1

      Saldina* :D

    • @omarious
      @omarious ปีที่แล้ว

      @@CodeBeauty Saldina! I stand corrected… my apologies.
      Blaming: autocorrect!

  • @wilgarcia1
    @wilgarcia1 ปีที่แล้ว +1

    😻😻😻😻😻😻😻😻😻

  • @rezafarokh8637
    @rezafarokh8637 ปีที่แล้ว +1

    Comment

  • @bharathap780
    @bharathap780 ปีที่แล้ว

    are there solution for your homework ? because i want to compare my solution to yours

  • @Kingston7685
    @Kingston7685 ปีที่แล้ว +2

    Tum kya mila

  • @nicholaskomsa1777
    @nicholaskomsa1777 7 หลายเดือนก่อน

    Here's how I might do that:

    struct Student {
    std::string mName;
    bool mGenderMale{ false };
    int mGrade{ 0 };
    Student(const std::string& name, bool isGenderMale, int grade)
    : mName(name), mGenderMale(isGenderMale), mGrade(grade)
    {}
    };
    std::array students = {
    Student{"John", true, 20}
    , {"Jane", false, 21}
    , {"Jack", true, 22}
    , {"jason", true, 23}
    , {"nick", true, 24}
    , {"nancy", false, 25}
    };
    std::string studentNameToFind = "Jane";
    auto studentFound = std::find_if(std::execution::seq, students.begin(), students.end(), [&](const auto& student) {
    return student.mName == studentNameToFind;
    });
    if (studentFound != students.end()) {
    auto& [name, isMale, grade] = *studentFound;
    std::cout b.mGrade;
    });
    auto& bestGrade = students.front();
    auto& worstGrade = students.back();
    //now sort by gender and grade
    //females are in the front of the array and males are at the end
    std::sort(std::execution::par, students.begin(), students.end(), [](const auto& a, const auto& b) {
    return a.mGenderMale < b.mGenderMale || a.mGenderMale b.mGrade;
    });
    for (auto& student : students) {
    std::cout