I have a function to bubble sort and I want to save the array after each swap into another array. The bubble sort is working properly and I can log the array after each swap to the console. But I cant seem to push to the other array properly. Here’s my code : Here’s a screenshot of the console :
Tag: bubble-sort
How to fill 128 boxes with 8 different code from mid of the row using program
I want to fill the 128 boxes with different no. of colors. Let’s consider that I have 8 colors to fillup those boxes and please check the below visual representation for an expected output. I’ve tried by using the Javascript, but didn’t get the expected result, Looks like the logic is not correct!, Please correct me if anything wrong. Thanks,