I hereby claim:
- I am imdanielsp on github.
- I am imdanielsp (https://keybase.io/imdanielsp) on keybase.
- I have a public key ASC12PWP4XHmybUNGo8ytv8GWoC3K1Bln528KKaYIY0xmwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#include <stdlib.h> | |
#include "queue.h" | |
#include "../LinkedList/linked_list.h" | |
struct Queue { | |
pLinkedList buffer; | |
}; | |
pQueue makeQueue() { | |
pQueue newQueue = malloc(sizeof(Queue)); |
/** | |
* \brief T is the template type used in the queue. For other types | |
* support, change 'int' to the type desired. | |
* */ | |
typedef int T; | |
/** | |
* \brief A forward declaration of the queue. This gives the client | |
* access to the Queue object itself without knowing the expecificts of the | |
* implementation making the object opaque. |
def converter(number, base): | |
def convert_to_base_10(val): | |
target_base = 10 # Target number base | |
output_sum = 0 # Initial value for output sum | |
expo = 0 # Initial exponent | |
digits = [int(x) for x in str(val)] # Convert the base 2 number to an array of integer | |
digits.reverse() # Reverse the array. | |
for d in digits: # For each bit... | |
if d != 0: # If it's not 0, we will get the value relative to the position |