Thank you for your help. I was trying to create a matrix class and your video helped a lot
@pratt7782 Жыл бұрын
I love you
@zhihuiyu5492 жыл бұрын
I don’t know why u give up upload video please come back
@rocket0072 жыл бұрын
heading off to part 2😃
@edelineengohasagah86582 жыл бұрын
Thanks for this video but I don't understand it as the other two
@neux642 жыл бұрын
Prior to figuring out how to use (or actually implement) this, I wished there was a part 3, but however I did figure out how to actually assign elements to the array and reference them. So basically, here's how you initialize and insert values into the matrix and print them: int main() { Matrix mat(2, 2); mat.getRow(0)[0] = 1; mat.getRow(0)[1] = 2; mat.getRow(1)[0] = 3; mat.getRow(1)[1] = 4; for (int i = 0; i < 2; i++) { for (int j = 0; j < 2; j++) cout << mat.getRow(i)[j] << " "; cout << endl; } return 0; } Output: 1 2 3 4 Thank me later (I followed along and changed my structure from float to int, so obv you would be assigning floats instead of ints). You could also probably add print() to the class recipe. - Matrix mat(2,2) initializes the matrix as a 2x2. mat.setSize(int row, int col) probably works, but I haven't tried it and prefer not to. - Right after that is code structured in a way to demonstrate the insertion of integer literals into the matrix. mat.getRow(r)[c] would basically be the same as mat[r][c] for a 2D array (or int**). I do wish there was a more concrete way we could insert elements into the matrix, but we must settle with referencing mat.getRow(int row) or mat.getColumn(int col) as 1D (or float*) arrays to insert what we want into them. There are probably other ways to do this but I'm moving on with this method for my needs.
@hammadahmad63122 жыл бұрын
hero <3
@racquetboy2 жыл бұрын
this video did not do what it said it would
@a.ricole40812 жыл бұрын
Thanks for this video!
@a.ricole40812 жыл бұрын
Thank you for covering this. Very helpful.
@a.ricole40812 жыл бұрын
This is 6 years ago, but the content is still relevant. Thank you for covering this. This is very helpful
@duce_19173 жыл бұрын
open worksheet pls
@duce_19173 жыл бұрын
really. how to make opponent?
@macalinkoos3 жыл бұрын
can you please share the C++ codes?
@nikoladimitrievski69663 жыл бұрын
For anyone trying to learn the MergeSort algorithm,the complexity of the algorithm should be O(n), and by using selection sort you make it O(n^2). So there is no point learning this algorithm because it's the same as using bubleSort or SelectionSort only. And bubleSort is 10 times easier to learn than this.
@ryana6961 Жыл бұрын
What? Time complexity of Merge Sort is O(n*log(n)). Its space complexity is O(n) when using an implementation that utilizes an auxiliary array. Selection sort and bubble sort will be faster on very small and already mostly sorted collections, however, Merge Sort will obliterate bubble sort and selection sort on much larger collections.
@Biggsmiles694 жыл бұрын
I can't find part 3. Can someone point me to it. Thanks for the great video
@neux642 жыл бұрын
It doesn't exist. Never had, never will.
@sayrarodriguez49694 жыл бұрын
I learned more from this 20-minute video than I have from my professor over a week. Thank You!
@zjakgenis76744 жыл бұрын
I LOVE YOU
@justanameonyourscreen59544 жыл бұрын
I'm just starting my journey into c++...as my first project I intend to make a choose your own adventure style story...thanks for this, it helps me realize how it all FITS together...
@kayne95284 жыл бұрын
I have to say this was the most informative tutorial I have watched while I have been learning C++!!! Thank you!
@possozio92194 жыл бұрын
famoc a mammt
@Redfrog10114 жыл бұрын
time complexity of this is n squared, merge sort should be nlogn This isnt merge sort
@Blure4 жыл бұрын
Why is it n squared? Because of the nested loop?
@httm2415 жыл бұрын
where is part 3
@zavio31994 жыл бұрын
i think its no coming.... just common sense bud XD
@zavio31994 жыл бұрын
not*
@httm2415 жыл бұрын
10/10 thank you vrey much
@nicoleebot50745 жыл бұрын
can you help me on my c++😁
@lalithaedipalli99495 жыл бұрын
Where can I find continuation of this algorithm
@gracenansamba27775 жыл бұрын
there's a kindness in this video..thank u
@AbolfazlShirazi5 жыл бұрын
error C2039: 'alloc\dealloc' : is not a member of 'Matrix' error C3861: ''alloc\dealloc': identifier not found
@neux642 жыл бұрын
Add them to the header.
@kevinguo92415 жыл бұрын
you are so dope
@tomroder79405 жыл бұрын
Hi! im truly thanks you for make this video! i've learned a lot! can you send me the code to my email? if you have time. [email protected]
@gubazoltan995 жыл бұрын
this video has 4k views still like no one actually clicked like... wtf ppl???
@hdkimo5 жыл бұрын
thanks you helped me advance in my exam preperations omg thank you again
@DeandreSteven5 жыл бұрын
how would i be able to integrate a class that puts a class function so i may generate random numbers from and plug them into automaticaly generated array?
@faramarzkhosravi6 жыл бұрын
please do not waste your time. completely wrong implementation
@neux642 жыл бұрын
Ok genius, how would you implement it? Got any better ideas? I reckon you just ignore what the error console is actually saying.
@faramarzkhosravi6 жыл бұрын
plenty of errors
@neux642 жыл бұрын
fix them
@ashleybushi6076 жыл бұрын
#include <iostream> using namespace std; //program to guess a number chosen by user int main() { //variable definitions int number; char answer; //defines constants int MAX = 100, MIN = 1, MID = (MAX + MIN)/2; char yesno = 'y'; //while loop to ensure program can run again if user wants while (yesno == 'y') //while look condition is if yesno is y loop if not end { //initial average cout << "Guess a number between 1 and 100. "; //asks user to think of a number between 1 and 100 cout << " Then enter one of the following values: h - higher, l - lower, c- correct."; cout << " Is it " << MID << "? (h/l/c): "; // asks user if average is correct cin >> answer; //algorithm for guessing number while (answer == 'h' || answer == 'H' || answer =='l'|| answer =='L') { switch(answer) { case 'h': case 'H': int NEW_MIN; NEW_MIN = (MID + 1); int NEW_AVE; NEW_AVE = (MAX + NEW_MIN)/2; MID = NEW_AVE; MIN = NEW_MIN; break; case 'l': case 'L': int NEW_MAX; NEW_MAX = (MID - 1); NEW_AVE = (NEW_MAX + MIN)/2; MID = NEW_AVE; MAX = NEW_MAX; break; case 'c': case 'C': answer = 'c'; break; default: break; } cout << " Is it " << MID << "? (h/l/c): "; // asks user if average is correct cin >> answer; } cout << " Great! Do you want to play again? (y/n): "; //prints the question cin >> yesno; //assigns yesno to value entered MAX = 100; MIN = 1; MID = 50; cout << " "; } return 0; //returns 0 from original main function }
@marcinpajak15346 жыл бұрын
and what about part 3?
@stelity6 жыл бұрын
It would be better if you just posted the code in the description. I tried typing it out, but I made too many errors and it was too much work to scroll through your video to see which lines I've got wrong.
@neux642 жыл бұрын
It's not really that much code compared to what you actually need to do in the line of work, which is 2000+ lines of code everyday that you have to "work to scroll through."
@T9898-u6g6 жыл бұрын
plz i need this code plz
@nallamillibalaveeraraghava96636 жыл бұрын
Hi great tutorial can you pls make detailed video on recursion and backtracking by teaching with some examples.
@rahuldhir22526 жыл бұрын
hey the time complexity of you algorithm would be O(n^2) which is as simply suing selection sort on the whole thing!
@sofyanmahmoud47766 жыл бұрын
i think that
@arjunbista67036 жыл бұрын
I tried to write a code but function for two pairs is not working, it gives the output just as a pair. what might be the missing part??
@hdkimo5 жыл бұрын
me too but i fixed it ! put matchingCards == 4 not 2
@minnthettin47735 жыл бұрын
@@hdkimo I did this but it is still not working.
@newaz96666 жыл бұрын
Thank You. Beautifully explained.
@tobiaskarl49396 жыл бұрын
OOP ist not necessary for blackjack
@malikbilal19977 жыл бұрын
How you can declare an array of variable size? int array1[half1];
@Itneesh7 жыл бұрын
it should be int *array1 = new int [half1]; then at the end of the function delete array1;
@rahuldhir22526 жыл бұрын
This is the other way to do it.
@aubreystacy15107 жыл бұрын
Thank you! Your videos for this class are so helpful! I've been taking the same course material online at my college, but the professor hasn't been very available to explain things like you do.
@albertoabadsanz36087 жыл бұрын
You need to upload part 3! man...
@SneakyBrownGuy7 жыл бұрын
This is was a very good video! but when you swap the indexes of the new min element and the current index you used array[minIndex] = array[start]; shouldnt it be array1[minIndex] = array1[start]?
@SneakyBrownGuy7 жыл бұрын
also when you are filling array1 and array2 for the for loop when filling array2 you set i as half1 but that means you are setting array2[half1] = array[half1]. There needs to be a separate counter so you can start at index 0 in array2 so then you can set index 0 to array[half1]. that was the error i was getting when using this code. After you change that it works well.
@alisautlik2946 жыл бұрын
SneakyBrownGuy Please, could you write this part of the code, where filling small arrays
@maheshranabhat43467 жыл бұрын
Hello Michael I did not see the header file? And is there part 3 too?