How can I optimize search algorithms in C language?
for (i = 0; i < n; ++i) foo(a[i]);
char **p = a; for (i = 0; i < n; ++i) foo(*p); ++p;
for (p = a; *p != NULL; ++p) foo(*p)
This code snippet was collected from stackoverflow, and is licensed under CC BY-SA 2.5
- How can I get the value of in a loop?
- How do I use the C socket API in C++ on Linux?
- Anatomy of a memory leak -'memory leak'
- Function for creating color wheels.
- What's the API for GTK messagebox?
- What is the most efficient code for 10000 prime numbers?
- How can I create an object instance from a Type?
- How can we efficiently get sorted sums of a sorted list?
- How is database indexing used?
- Why am I getting double free error when I call realloc()?
- What is the most efficient graph data structure in Python?
- "Sorting" colors by distinctiveness. Followup:
- Data verifications in Getter or elsewhere?
- How do you format an unsigned long int using printf?
- What is the best way to calculate Big O?