Search
 
SCRIPT & CODE EXAMPLE
 

CPP

Shell-Sort C++

C/C++/Java
1  gap = X;
2  do
3  { ok = 1;
4  for (i = 1; i<= N – gap; i++)
5    if (A[i] > A[i+gap])
6    {  temp = A[i];
7       A[i] = A[i+gap];
8       A[i+gap] = temp;
9       ok = 0;
10   }
11 if (gap/2 > 1) gap=gap/2; else gap=1;
12 } while (ok == 0);
Comment

PREVIOUS NEXT
Code Example
Cpp :: sort an array using stl 
Cpp :: std::is_standard_layout 
Cpp :: dream speedrun song mp4 
Cpp :: progress bar custom color c++ buider 
Cpp :: Types of Conversions- C++ 
Cpp :: c++ how to use and or in if 
Cpp :: how to measure cpp code performace 
Cpp :: softwareegg.courses4u 
Cpp :: . Single-line comments start with two forward slashes (//). 
Cpp :: Missing GL version 
Cpp :: sqrt function in c++ 
Cpp :: c++ put a function in a other thread 
Cpp :: c++ to mips assembly converter 
Cpp :: foo foo little dogs 
Cpp :: go to particular place in vector using iterator 
Cpp :: c++ bind what are placeholders 
Cpp :: punteros a arrays 
Cpp :: C++ Vector Initialization method 01 
Cpp :: what is stdarg.h used for 
Cpp :: my cpp 
Cpp :: 191. Number of 1 Bits leetcode solution in c++ 
Cpp :: c++ map access 
Cpp :: sort array using stl 
Cpp :: ue4 array copy c++ 
Cpp :: pass address to function c++ 
Cpp :: C++ (ISO) 
Cpp :: C++: Methods of code shortening in competitive programming 
Cpp :: 2d stl array 
Cpp :: android call custom managed method from native code 
Cpp :: _ZNSolsEi 
ADD CONTENT
Topic
Content
Source link
Name
2+2 =