`
dmhorse
  • 浏览: 25183 次
  • 来自: ...
最近访客 更多访客>>
社区版块
存档分类
最新评论

Algorithms

J# 
阅读更多

//Inserting sort

int A[] = {3,43,34,21,7,56,2};
for (int i=1;i<A.length;i++){
  int key = A[i];
  loop: for(int j= i-1;j>=0;j--){
     if(A[j] > key){
       A[j + 1 ] = A[j];
      if ( j == 0)
         A[j] = key;
     }else{
        A[j+1] = key;
        break loop;
     }
}
 
分享到:
评论

相关推荐

    Introduction to Algorithms Third Edition

    there are even more algorithms, and algorithms lie at the heart of computing. This book provides a comprehensive introduction to the modern study of computer algorithms. It presents many algorithms ...

    Algorithms: Design and Analysis

    Harsh Bhasin, "Algorithms: Design and Analysis" English | ISBN: 0199456666 | 2015 | 692 pages Algorithms: Design and Analysis of is a textbook designed for the undergraduate and postgraduate ...

    Rigid Body Dynamics Algorithms Featherstone, Roy

    Rigid Body Dynamics Algorithms presents the subject of computational rigid-body dynamics through the medium of spatial 6D vector notation. It explains how to model a rigid-body system and how to ...

    Essential Algorithms A Practical Approach to Computer Algorithms Rod Stephens

    本书《Essential Algorithms A Practical Approach to Computer Algorithms Rod Stephens》深入浅出地介绍了计算机算法的基础知识、概念和应用实践,内容涵盖广泛,旨在为读者提供算法学习的实用指南。 在第1章...

    Fast Fourier Transform - Algorithms and Applications

    Title: Fast Fourier Transform - Algorithms and Applications Author(s): K.R. Rao, D.N. Kim, J.-J. Hwang (auth.) Series: Signals and Communication Technology Publisher: Springer Netherlands Year: ...

    Algorithms + Data Structures = Programs

    Algorithms + Data Structures = Programs[1] is a 1976 book written by Niklaus Wirth covering some of the fundamental topics of computer programming, particularly that algorithms and data structures are...

Global site tag (gtag.js) - Google Analytics