diff --git a/d0/d6c/problem__4_2sol_8c.html b/d0/d6c/problem__4_2sol_8c.html index c9fe697d..f836be93 100644 --- a/d0/d6c/problem__4_2sol_8c.html +++ b/d0/d6c/problem__4_2sol_8c.html @@ -182,22 +182,21 @@ Functions

Main function.

26{
-
27 unsigned int i, j, max = 0;
+
27 unsigned int i, j, max = 0;
28 for (i = 100; i <= 999; i++)
29 {
30 for (j = 100; j <= 999; j++)
31 {
32 unsigned int p = i * j;
-
33 if (is_palindromic(p) && p > max)
+
33 if (is_palindromic(p) && p > max)
34 {
-
35 max = p;
+
35 max = p;
36 }
37 }
38 }
-
39 printf("%u\n", max);
+
39 printf("%u\n", max);
40 return 0;
41}
-
#define max(a, b)
shorthand for maximum value
Definition: kohonen_som_topology.c:39
int is_palindromic(unsigned int n)
Check if number is palindromic.
Definition: sol.c:12
Here is the call graph for this function:
diff --git a/d0/df3/6_8c.html b/d0/df3/6_8c.html index 9261fdd4..471dd5d4 100644 --- a/d0/df3/6_8c.html +++ b/d0/df3/6_8c.html @@ -187,8 +187,8 @@ Functions
42 return out;
43 }
44
-
45 uint16_t max = numRows - 1;
-
46 uint16_t rr = 2 * max;
+
45 uint16_t max = numRows - 1;
+
46 uint16_t rr = 2 * max;
47 uint16_t i = 0;
48 uint16_t o = 0;
49 uint16_t delta = 0;
@@ -201,7 +201,7 @@ Functions
56 }
57
58 // middle rows
-
59 for (uint16_t l = 1; l < max; l++)
+
59 for (uint16_t l = 1; l < max; l++)
60 {
61 i = l;
62 delta = 2 * l;
@@ -214,7 +214,7 @@ Functions
69 }
70
71 // last row
-
72 i = max;
+
72 i = max;
73 while (i < len)
74 {
75 out[o++] = in[i];
@@ -223,7 +223,6 @@ Functions
78
79 return out;
80}
-
max
#define max(a, b)
shorthand for maximum value
Definition: kohonen_som_topology.c:39
calloc
#define calloc(elemCount, elemSize)
This macro replace the standard calloc function with calloc_dbg.
Definition: malloc_dbg.h:22
diff --git a/d2/da8/bead__sort_8c.html b/d2/da8/bead__sort_8c.html index 22f02163..661b1e64 100644 --- a/d2/da8/bead__sort_8c.html +++ b/d2/da8/bead__sort_8c.html @@ -118,7 +118,7 @@ Include dependency graph for bead_sort.c:

Macros

-#define BEAD(i, j)   beads[i * max + j] +#define BEAD(i, j)   beads[i * max + j]  Create easy access of elements from a 2D matrix stored in memory as a 1D array.
  diff --git a/d5/d4c/group__sorting.html b/d5/d4c/group__sorting.html index 57a99684..43f57db6 100644 --- a/d5/d4c/group__sorting.html +++ b/d5/d4c/group__sorting.html @@ -107,7 +107,7 @@ $(document).ready(function(){initNavTree('d5/d4c/group__sorting.html','../../'); +#define 

Macros

-#define BEAD(i, j)   beads[i * max + j]
BEAD(i, j)   beads[i * max + j]
 Create easy access of elements from a 2D matrix stored in memory as a 1D array.
 
@@ -175,20 +175,20 @@ Functions
38{
-
39 int i, j, max, sum;
+
39 int i, j, max, sum;
40 unsigned char *beads;
41
-
42 for (i = 1, max = a[0]; i < len; i++)
-
43 if (a[i] > max)
-
44 max = a[i];
+
42 for (i = 1, max = a[0]; i < len; i++)
+
43 if (a[i] > max)
+
44 max = a[i];
45
-
46 beads = calloc(1, max * len);
+
46 beads = calloc(1, max * len);
47
48 /* mark the beads */
49 for (i = 0; i < len; i++)
50 for (j = 0; j < a[i]; j++) BEAD(i, j) = 1;
51
-
52 for (j = 0; j < max; j++)
+
52 for (j = 0; j < max; j++)
53 {
54 /* count how many beads are on each post */
55 for (sum = i = 0; i < len; i++)
@@ -202,13 +202,12 @@ Functions
63
64 for (i = 0; i < len; i++)
65 {
-
66 for (j = 0; j < max && BEAD(i, j); j++)
+
66 for (j = 0; j < max && BEAD(i, j); j++)
67 ;
68 a[i] = j;
69 }
70 free(beads);
71}
-
#define max(a, b)
shorthand for maximum value
Definition: kohonen_som_topology.c:39
#define BEAD(i, j)
Create easy access of elements from a 2D matrix stored in memory as a 1D array.
Definition: bead_sort.c:16
#define free(ptr)
This macro replace the standard free function with free_dbg.
Definition: malloc_dbg.h:26
#define calloc(elemCount, elemSize)
This macro replace the standard calloc function with calloc_dbg.
Definition: malloc_dbg.h:22
diff --git a/d6/d77/md_leetcode__d_i_r_e_c_t_o_r_y.html b/d6/d77/md_leetcode__d_i_r_e_c_t_o_r_y.html index 740c7ebf..124e1c19 100644 --- a/d6/d77/md_leetcode__d_i_r_e_c_t_o_r_y.html +++ b/d6/d77/md_leetcode__d_i_r_e_c_t_o_r_y.html @@ -150,150 +150,152 @@ LeetCode Algorithm
+ + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - + + +
38 Count and Say C Easy
42 Trapping Rain Water C Hard
53 Maximum Subarray C Easy
62 Unique Paths C Medium
66 Plus One C Easy
82 Remove Duplicates from Sorted List II C Medium
83 Remove Duplicates from Sorted List C Easy
94 Binary Tree Inorder Traversal C Medium
101 Symmetric Tree C Easy
104 Maximum Depth of Binary Tree C Easy
108 Convert Sorted Array to Binary Search Tree C Easy
109 Convert Sorted List to Binary Search Tree C Medium
110 Balanced Binary Tree C Easy
112 Path Sum C Easy
118 Pascal's Triangle C Easy
121 Best Time to Buy and Sell Stock C Easy
125 Valid Palindrome C Easy
136 Single Number C Easy
141 Linked List Cycle C Easy
142 Linked List Cycle II C Medium
153 Find Minimum in Rotated Sorted Array C Medium
160 Intersection of Two Linked Lists C Easy
169 Majority Element C Easy
173 Binary Search Tree Iterator C Medium
189 Rotate Array C Easy
190 Reverse Bits C Easy
191 Number of 1 Bits C Easy
201 Bitwise AND of Numbers Range C Medium
203 Remove Linked List Elements C Easy
206 Reverse Linked List C Easy
215 Kth Largest Element in an Array C Medium
217 Contains Duplicate C Easy
223 Rectangle Area C Medium
226 Invert Binary Tree C Easy
231 Power of Two C Easy
234 Palindrome Linked List C Easy
242 Valid Anagram C Easy
268 Missing Number C Easy
278 First Bad Version C Easy
283 Move Zeroes C Easy
287 Find the Duplicate Number C Medium
344 Reverse String C Easy
367 Valid Perfect Square C Easy
387 First Unique Character in a String C Easy
389 Find the Difference C Easy
404 Sum of Left Leaves C Easy
442 Find All Duplicates in an Array C Medium
461 Hamming Distance C Easy
476 Number Complement C Easy
509 Fibonacci Number C Easy
520 Detect Capital C Easy
561 Array Partition I C Easy
617 Merge Two Binary Trees C Easy
647 Palindromic Substring C Medium
674 Longest Continuous Increasing Subsequence C Easy
700 Search in a Binary Search Tree C Easy
701 Insert into a Binary Search Tree C Medium
704 Binary Search C Easy
709 To Lower Case C Easy
771 Jewels and Stones C Easy
852 Peak Index in a Mountain Array C Easy
876 Middle of the Linked List C Easy
905 Sort Array By Parity C Easy
917 Reverse Only Letters C Easy
938 Range Sum of BST C Easy
965 Univalued Binary Tree C Easy
977 Squares of a Sorted Array C Easy
1009 Complement of Base 10 Integer C Easy
1089 Duplicate Zeros C Easy
1184 Distance Between Bus Stops C Easy
1189 Maximum Number of Balloons C Easy
1207 Unique Number of Occurrences C Easy
1524 Number of Sub-arrays With Odd Sum C Medium
1752 Check if Array Is Sorted and Rotated C Easy
1524 Number of Sub-arrays With Odd Sum C Medium
1752 Check if Array Is Sorted and Rotated C Easy
2130 Maximum Twin Sum of a Linked List C Medium
diff --git a/globals_func_i.html b/globals_func_i.html index d49ded05..4f313e16 100644 --- a/globals_func_i.html +++ b/globals_func_i.html @@ -119,8 +119,8 @@ $(document).ready(function(){initNavTree('globals_func_i.html',''); initResizabl
  • isEmpty() : infix_to_postfix.c, infix_to_postfix2.c
  • isOprnd() : infix_to_postfix.c
  • isPalindrome() : palindrome.c
  • -
  • isPrime() : prime.c
  • isprime() : sol1.c
  • +
  • isPrime() : prime.c
  • isStrong() : strong_number.c
  • diff --git a/globals_i.html b/globals_i.html index 98b066aa..50f4578f 100644 --- a/globals_i.html +++ b/globals_i.html @@ -120,8 +120,8 @@ $(document).ready(function(){initNavTree('globals_i.html',''); initResizable();
  • isEmpty() : infix_to_postfix.c, infix_to_postfix2.c
  • isOprnd() : infix_to_postfix.c
  • isPalindrome() : palindrome.c
  • -
  • isPrime() : prime.c
  • isprime() : sol1.c
  • +
  • isPrime() : prime.c
  • isStrong() : strong_number.c
  • diff --git a/search/all_b.js b/search/all_b.js index 7e646be6..c43fe7af 100644 --- a/search/all_b.js +++ b/search/all_b.js @@ -27,7 +27,7 @@ var searchData= ['isempty_24',['isEmpty',['../db/d0c/infix__to__postfix_8c.html#afa8471c76bc57b12ad21de22beb39021',1,'isEmpty(struct Stack s): infix_to_postfix.c'],['../da/d96/infix__to__postfix2_8c.html#a653c98c68c558505b75b04c44b7c838e',1,'isEmpty(): infix_to_postfix2.c']]], ['isoprnd_25',['isOprnd',['../db/d0c/infix__to__postfix_8c.html#afd8245c04b202240390de23170f72d6b',1,'infix_to_postfix.c']]], ['ispalindrome_26',['isPalindrome',['../df/d16/palindrome_8c.html#a6320493ddee0ca4614423721c5d6f4ba',1,'palindrome.c']]], - ['isprime_27',['isPrime',['../da/d93/prime_8c.html#a6384596f117decd77da25af95ab1704f',1,'prime.c']]], - ['isprime_28',['isprime',['../d7/dd3/problem__3_2sol1_8c.html#aa0f4796aa2e89c327f827bd55f5cb305',1,'sol1.c']]], + ['isprime_27',['isprime',['../d7/dd3/problem__3_2sol1_8c.html#aa0f4796aa2e89c327f827bd55f5cb305',1,'sol1.c']]], + ['isprime_28',['isPrime',['../da/d93/prime_8c.html#a6384596f117decd77da25af95ab1704f',1,'prime.c']]], ['isstrong_29',['isStrong',['../d4/dcc/strong__number_8c.html#a03654cadb0cfe1195810dbe5da0265b5',1,'strong_number.c']]] ]; diff --git a/search/functions_9.js b/search/functions_9.js index 99456305..f8cdfa79 100644 --- a/search/functions_9.js +++ b/search/functions_9.js @@ -19,7 +19,7 @@ var searchData= ['isempty_16',['isEmpty',['../db/d0c/infix__to__postfix_8c.html#afa8471c76bc57b12ad21de22beb39021',1,'isEmpty(struct Stack s): infix_to_postfix.c'],['../da/d96/infix__to__postfix2_8c.html#a653c98c68c558505b75b04c44b7c838e',1,'isEmpty(): infix_to_postfix2.c']]], ['isoprnd_17',['isOprnd',['../db/d0c/infix__to__postfix_8c.html#afd8245c04b202240390de23170f72d6b',1,'infix_to_postfix.c']]], ['ispalindrome_18',['isPalindrome',['../df/d16/palindrome_8c.html#a6320493ddee0ca4614423721c5d6f4ba',1,'palindrome.c']]], - ['isprime_19',['isPrime',['../da/d93/prime_8c.html#a6384596f117decd77da25af95ab1704f',1,'prime.c']]], - ['isprime_20',['isprime',['../d7/dd3/problem__3_2sol1_8c.html#aa0f4796aa2e89c327f827bd55f5cb305',1,'sol1.c']]], + ['isprime_19',['isprime',['../d7/dd3/problem__3_2sol1_8c.html#aa0f4796aa2e89c327f827bd55f5cb305',1,'sol1.c']]], + ['isprime_20',['isPrime',['../da/d93/prime_8c.html#a6384596f117decd77da25af95ab1704f',1,'prime.c']]], ['isstrong_21',['isStrong',['../d4/dcc/strong__number_8c.html#a03654cadb0cfe1195810dbe5da0265b5',1,'strong_number.c']]] ];