Hi, can you help me with my project? can you do a tutorial for a 6174 problem? where the user can input a 4-digit number , and arrange the digits of the given number in ascending order. Next, arrange the same digits in descending order. then Find the difference between the two arranged numbers. Use this as the next number in the sequence.
The sequence will eventually repeat at 0 (if all digits are the same) or, For 3- and 4-digit numbers, these are the single numbers 495 and 6174. Thanks :)
@KamilleCarreon you should be able to pull out each digit using modulus (%) and put them in an array and run the bubble sort that I show in this tutorial. You'd need to set up some extra steps with a while loop so that it keeps repeating until it hits 0.
I can't help you write the program from scratch, however, if you have something written out, you can email me through the Easy programming website with any questions and I'll be happy to help.
@brawl313 watch tutorial 25, it's titled "Index sort with void functions" - the index sort is similar to the bubble sort but it changes around the indexes of the arrays and I show you how to use functions with the sort. It's also the video response to this video.
Thanks for the reply ur video helped, but Is selection sort the same as index or bubble sort? I'll check out the other and get that running..thanks again tutoria
@NYMPHOBEATZ Yeah I believe they are the same since they both move around the subscript values of the arrays. All these sorts end up having similar, if not the same, lines of codes.
@NYMPHOBEATZ do you mean how you would put the sorting code into a function? If yes, I have a video with the title "Index Sort with Void Functions" - the Index Sort is similar to the Bubble Sort and there I show you how to easily put the sorting code into a function that you call to in the main program.
@domeee11 if you already know how to read from a file, then this shouldn't be too difficult, you should open the file and read everything inside and then make it go through the bubble sort. Unfortunately, I don't cover fstream in any of my tutorials yet, I plan on it for the future. But if you have codes already and have specific questions about them, feel free to contact me, I'll help where ever I can :)
@njoker555 hey thanks for the reply.. i figured it out just after i watch your video.. thanks a LOT btw.. i missed my class when the teacher explains this, and u save my day.. ill send you my code, just for reference :)
In other bubble sort implementations I have seen they keep track of if there was a swap in the inner loop and only run as long as there was a swap. This often more efficient and is quite fast for already sorted sets.
Thanks so much for making these tutorials, I accidentally deleted my notes from my C++ class and was completely lost on bubble sorting. I couldn't find help anywhere else online because apparently everyone else out there seems to think that just because you have a question means you want someone else to do your homework for you. All I needed was a demonstration and explanation and your video did that very well.
I'm just a beginner so If I'm wrong then please correct me. Are you sure this is a bubble sort?
You are comparing if(numb[i] > numb[j]
here if i = 0 then numb[j] = 1( i+1)
In this case for the nested loop,
you are comparing values numb[i=0] and with numb[j=1]
and then [i=0] with numb[j=2], and with numb[j=3].. and keep swamping value of numb[i=0]. I don't think this is bubble sort. It will sort because you have correct logic. Due to word restrictions I can't explain further.
You just have to imagine it like the bigger numbers are slowly moving outwards while the smaller ones are being pushed in. It may not resemble a bubble perfectly, but that's basically the point. That's how I learned it anyway :)
@ALHABBAD well, I won't do any work for you so I won't accept any payment. If you're stuck on a certain line or error, you can pass that to me and I'll try to help you that way but I can't work with you to write a program from scratch.
Hi, can you help me with my project? can you do a tutorial for a 6174 problem? where the user can input a 4-digit number , and arrange the digits of the given number in ascending order. Next, arrange the same digits in descending order. then Find the difference between the two arranged numbers. Use this as the next number in the sequence.
The sequence will eventually repeat at 0 (if all digits are the same) or, For 3- and 4-digit numbers, these are the single numbers 495 and 6174. Thanks :)
KamilleCarreon 1 day ago
@KamilleCarreon you should be able to pull out each digit using modulus (%) and put them in an array and run the bubble sort that I show in this tutorial. You'd need to set up some extra steps with a while loop so that it keeps repeating until it hits 0.
I can't help you write the program from scratch, however, if you have something written out, you can email me through the Easy programming website with any questions and I'll be happy to help.
Good luck.
njoker555 1 day ago
great tutorial! do you have a tutorial for selection sort?
jannyjoyzee 2 weeks ago
@jannyjoyzee take a look at my Index sort tutorial.
njoker555 2 weeks ago
how would this program look with functions, is it possible you make a video of it and explain it?
brawl313 1 month ago
@brawl313 watch tutorial 25, it's titled "Index sort with void functions" - the index sort is similar to the bubble sort but it changes around the indexes of the arrays and I show you how to use functions with the sort. It's also the video response to this video.
njoker555 1 month ago
@njoker555 oh okay, thanks a lot. Great videos by the way. Easy to follow explanations.
brawl313 1 month ago
@brawl313 no problem and thank you :) glad you find them useful.
njoker555 1 month ago
Is there a Bubble sort or a Selection sort in video?? As I think this is selection sort.
MultiDoMore 1 month ago
@MultiDoMore This is the bubble sort, you should look at my index sort video, that should be what you're looking for in terms of selection sort.
njoker555 1 month ago
Great video, thanks so much
LetsGoBuffalo92 2 months ago
Great, it helps to understand bubble sirt very easily.
shakilearl 2 months ago
good job :)
adminos15 3 months ago
Ur tutorials are better than my 2 hour mon we'd lecture ...don't know why those tenured jerks get paid so much to do nothing...
NYMPHOBEATZ 3 months ago
@NYMPHOBEATZ I've been there myself :) it's one of the reasons I decided to create these tutorials. But my tuts are far from perfect.
njoker555 3 months ago
Thanks for the reply ur video helped, but Is selection sort the same as index or bubble sort? I'll check out the other and get that running..thanks again tutoria
NYMPHOBEATZ 3 months ago
@NYMPHOBEATZ Yeah I believe they are the same since they both move around the subscript values of the arrays. All these sorts end up having similar, if not the same, lines of codes.
njoker555 3 months ago
How would I ad a function to do the sorting?
NYMPHOBEATZ 3 months ago
@NYMPHOBEATZ do you mean how you would put the sorting code into a function? If yes, I have a video with the title "Index Sort with Void Functions" - the Index Sort is similar to the Bubble Sort and there I show you how to easily put the sorting code into a function that you call to in the main program.
njoker555 3 months ago
how about with filestream and i need to make both ascending and descending sorting? kinda confused lol
domeee11 3 months ago
@domeee11 if you already know how to read from a file, then this shouldn't be too difficult, you should open the file and read everything inside and then make it go through the bubble sort. Unfortunately, I don't cover fstream in any of my tutorials yet, I plan on it for the future. But if you have codes already and have specific questions about them, feel free to contact me, I'll help where ever I can :)
njoker555 3 months ago
@njoker555 hey thanks for the reply.. i figured it out just after i watch your video.. thanks a LOT btw.. i missed my class when the teacher explains this, and u save my day.. ill send you my code, just for reference :)
domeee11 3 months ago
@domeee11 glad my video helped :)
njoker555 3 months ago
thanks for the video man, you explained this perfectly I had read up on alot of things on the code of bubble sorting and nothing made sense.
this video was perfect
ughLACARI 4 months ago
@ughLACARI I'm glad it helped :)
njoker555 4 months ago
thank you very much! was very useful
thalesrock 9 months ago
In other bubble sort implementations I have seen they keep track of if there was a swap in the inner loop and only run as long as there was a swap. This often more efficient and is quite fast for already sorted sets.
Peterolen 10 months ago
Thanks so much for making these tutorials, I accidentally deleted my notes from my C++ class and was completely lost on bubble sorting. I couldn't find help anywhere else online because apparently everyone else out there seems to think that just because you have a question means you want someone else to do your homework for you. All I needed was a demonstration and explanation and your video did that very well.
a4nandez 11 months ago
@a4nandez glad the video helped then :) and thanks for your kind comment, means a lot to know people are watching and that it's helping some people.
njoker555 11 months ago
@njoker555
I'm just a beginner so If I'm wrong then please correct me. Are you sure this is a bubble sort?
You are comparing if(numb[i] > numb[j]
here if i = 0 then numb[j] = 1( i+1)
In this case for the nested loop,
you are comparing values numb[i=0] and with numb[j=1]
and then [i=0] with numb[j=2], and with numb[j=3].. and keep swamping value of numb[i=0]. I don't think this is bubble sort. It will sort because you have correct logic. Due to word restrictions I can't explain further.
subjugator7 6 months ago
@subjugator7 I'm sure in a bubble sort :)
You just have to imagine it like the bigger numbers are slowly moving outwards while the smaller ones are being pushed in. It may not resemble a bubble perfectly, but that's basically the point. That's how I learned it anyway :)
njoker555 6 months ago
thank you so much....
now i can proudly pass my assignment
heheheh....
paduaaaron 11 months ago
ok, thanks for that.
i will let you no if i got any problem
have a good one
by the way your videos are very helpful i like
ALHABBAD 11 months ago
@ALHABBAD no problem and thank you :)
njoker555 11 months ago
i have some difficulty to do my HW assignment in C++
would you like to work with me and i am gonna pay you for that.
if yes how could i send you the assignment and how could i pay you
ALHABBAD 11 months ago
@ALHABBAD well, I won't do any work for you so I won't accept any payment. If you're stuck on a certain line or error, you can pass that to me and I'll try to help you that way but I can't work with you to write a program from scratch.
njoker555 11 months ago
i have some difficulty to do my HW assignment in C++
would you like to work with me and i am gonna pay you for that.
if yes how could i send you the assignment and how could i pay you
ALHABBAD 11 months ago
This has been flagged as spam show
hello , i am taking C++ this semester
i need to contact you
this is my e mail
ccc3344@hotmail.com
ALHABBAD 11 months ago
@ALHABBAD you can contact me by pm if you need help or just comment on my videos - I check almost everyday (sometimes several times a day)
njoker555 11 months ago
appreciate the time spent and video
TheSteamboats 1 year ago
@TheSteamboats thanks :) glad you like it.
njoker555 1 year ago