:::Implement Stack using Linked-list and dynamic arrays:::

Every implementation has its own advantange, singly Linked-list can only be accessed in forward direction and also need to dynamically allocate memory for new element, but Linked-list is easily to implement; Dynamic array can randomly access the data which is not useful for Stack data structure and also need to shrink or grow occasionally, so the overhead of using dynamic array is large.

:::Permutations of a string:::

Personal speaking, this is a hard problem within a time limit. Recursion is used to solve this problem. The base case is all letters in this string have been used and one permutation is generated. The recursive case is for every selected letter at position N, generate all other permutations starting from position N+1 by using all other available letters left in the string. When codeing in C, unmark the returned letter for next possible permutation is very important which guarantee all letters are used in only once in one permutation

:::Combination of a string:::

This is also a hard problem. Develop an correct and working algorithm is critical point. Meanwhile, this is a similar problem as the permutation problem, but since we count '12' same as '21', the algorithm is different. Take 'wxyz' for example, all four characters can be in the first letter in the combination,'xyz' can be the second letter,'yz' can be the third letter and only 'z' can be the last letter if we generate the combinations in the order of string. So we can use recursion to solve this problem.

:::Test the computer's endianness:::

This is a very good problem to test the knowledge of computer architecture and C programming skills. There are two shining point here. 1. understand what is the Endianness. 2. use C skills to access the byte of a multiplebyte value.
Big-endian means the most-significant-byte is stored in the lowest memory address; little-endian means the least-significant-byte is stored in the lowest memory address.
To access the single byte of a multiple byte value, there are two ways.1. cast data type to char type which only occupies one byte.2. use Union data type in C.
1.int Endianness(void) //1:little endian;0: big-endian
{
int testNum;
char * ptr;
testNum=1;
ptr=(char*)&testNum;
return (*ptr);
}

2.int Endianness(void) //1:little endian;0:big-endian
{
union{
int theInteger;
char singleByte;
}endianness
endianness.theInteger=1;
return endianness.singleByte;
}