This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//running time O(n) | |
//in place | |
/** | |
*the idea is to draw an example and to see what's needs to be done , so the idea is to use simple logic :) | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#define SIZE 16 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//running time O(n) | |
//in place | |
/** | |
*the idea is to move all the elements with even values to the head. | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
struct Node{ |