Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

LISP part V

Name: Anonymous 2008-03-08 8:38

LISP

Name: Anonymous 2008-04-04 4:52

how do i do this in lisp?
void sort(uintmax_t *numbers, size_t length){
 uintmax_t temp[length];
 uintmax_t *arrays[2] = {numbers, temp};
 for(uint_fast8_t i = 0; i < sizeof(uintmax_t) * CHAR_BIT; ++i){
  for(size_t j = 0, start = 0, end = length - 1; j < length; ++j){
   if(!(arrays[i & 1][j] & 1 << i))
    arrays[i & 1 ^ 1][start++] = arrays[i & 1][j];
   if(arrays[i & 1][length - j - 1] & 1 << i)
    arrays[i & 1 ^ 1][end--] = arrays[i & 1][length - j - 1];
}}}

Newer Posts