I would like to express my thanks to you, Tamim Shahriar, My gratitude for your indisputably magnificent assistance is almost infinite. Your efforts have not gone unnoticed. I really like your contribution that you have in our society, you really make a difference and help others out, the world could always use more people like you. Gosh, what a polite and humble fellow. It is such a kind honour for someone as low as me to be in contact with someone of a level such as yours. I thank you once again my good friend. A world without you, would be a world I would not be able to live in, and I believe I share that opinion with most people. I can rest easy tonight knowing you helped. I appreciate you and everything you stand for and on behalf of everyone on planet earth, thanks.
selection sort অ্যালগরিদম আমরা আসলে ব্যবহার করব না। অ্যালগরিদমটা কিভাবে কাজ করে এটা শেখা দরকার হচ্ছে প্রোগ্রামিং লজিক বুঝার জন্য - নিজের প্রোগ্রামিং লজিক বাড়ানোর জন্য।
Sir, I have simplified this code. Can you take a look, please? int arr[5] = {2, 5, 3, 4, 1}; for (int j = 0; j < 4; j++) { for (int k = j+1; k < 5; k++) { if (arr[j] > arr[k]) { int temp = arr[j]; arr[j] = arr[k]; arr[k] = temp; } } } By the way, your videos are very informative. Thanks a lot.
Umm I have a question . In the time complexicity of selection sort the expression was n+ n-1 + n-2 ... 2 + 1. If we just add this thing , we would have some kn + constant . I know I don't have to think about this when I am in math class but here , it matters , if I think this way my complexicity is O(n) ; why am I wrong ? And , I might encounter same type of arguments as the programmes will be more complex , so I think its important ...
The sum of this series is n * (n+1) / 2, which is n^2/2 and can be written as O(n^2). Please go through this proof - en.wikipedia.org/wiki/1_%2B_2_%2B_3_%2B_4_%2B_⋯