What do you want to save?
Add Code snippet
New code examples
-
Other 2021-10-29 10:28:11
How do you move through a Huffman tree? Select one: a. 0 = right 1= left b. 1 = left 2 = right c. 0 = left 1 = right d. 0 = middle 1 = back
// Huffman Coding in C++ #include <iostream> using namespace std; #define MAX_TREE_HT 50 struct MinHNode { unsigned freq; char item; struct MinHNode *left, *right; }; struct MinH { unsigned size; unsigned capacity; struct MinHNode **... Add solution -
C 2021-10-28 16:15:10
two bytes to int c
// bytes_to_int_example.cpp // Output: port = 514 // I am assuming that the bytes the bytes need to be treated as 0-255 and combined MSB -> LSB // This creates a macro in your code that does the conversion and can be tweaked as necessary #define byte... Add solution -
C 2021-10-11 16:26:05
data types in c
[8-bit] signed char: -127 to 127 [8-bit] unsigned char: 0 to 255 [16-bit]signed short: -32767 to 32767 [16-bit]unsigned short: 0 to 65535 [32-bit]signed long: -2147483647 to 2147483647 [32-bit]unsigned long: 0 to 4294967295 [64-bit]signed long long... Add solution -
Javascript 2021-10-10 11:05:06
javascript compare 2 thresholds color
typedef struct { unsigned char r, g, b; } RGB; double ColourDistance(RGB e1, RGB e2) { long rmean = ( (long)e1.r + (long)e2.r ) / 2; long r = (long)e1.r - (long)e2.r; long g = (long)e1.g - (long)e2.g; long b = (long)e1.b - (long)e2.b... Add solution -
C 2021-09-27 22:35:03
how maany bytes in an int in C
[8-bit] signed char: -127 to 127 [8-bit] unsigned char: 0 to 255 [16-bit]signed short: -32767 to 32767 [16-bit]unsigned short: 0 to 65535 [32-bit]signed long: -2147483647 to 2147483647 [32-bit]unsigned long: 0 to 4294967295 [64-bit]signed long long... Add solution