This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang racket | |
(define-syntax foo | |
(lambda (stx) | |
(syntax "I am foo"))) | |
(define-syntax (also-foo stx) | |
(syntax "I am also foo")) | |
(define-syntax (quoted-foo stx) | |
#'"I am also foo, using #' instead of syntax") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* -1 not found */ | |
unsigned int findList(const unsigned int DATA_A, const unsigned int DATA_B){ | |
unsigned int prevEntry = NULL, curEntry = ListHead; | |
while(curEntry != NULL) { | |
if (ListArray[curEntry].DataH == DATA_A && ListArray[curEntry].DataL == DATA_B) { | |
printf("FoundEntry = %d, PreEntry = %d\n", curEntry, prevEntry); | |
return curEntry; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int lowerBound(const int nums[], int numsSize, int target){ | |
int lb = 0, n = numsSize, step; | |
while(n > 0){ | |
step = n/2; | |
if(nums[lb+step] < target){ | |
lb += step+1; | |
n -= step+1; |