We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
i agree with you even if you try to implement the Swap method as follow
Swap (ref int a , ref int b)
{
int temp;
temp = b;
b = a;
a = temp;
}
the compiler of hacker rank did not recoginze the ref keywork which refers to pass by refernce
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Sorting: Bubble Sort
You are viewing a single comment's thread. Return to all comments →
i agree with you even if you try to implement the Swap method as follow Swap (ref int a , ref int b) { int temp; temp = b; b = a; a = temp; } the compiler of hacker rank did not recoginze the ref keywork which refers to pass by refernce