I hereby claim:
- I am yoshw on github.
- I am ywakeham (https://keybase.io/ywakeham) on keybase.
- I have a public key ASCkBr3T_SjZP1usiy8REi2lso0jHA8Zy2hB89g677naawo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
from enum import Enum, IntEnum | |
class Suit(Enum): | |
clubs = 1 | |
diamonds = 2 | |
hearts = 3 | |
spades = 4 | |
def __repr__(self): | |
suit_icons = "♣♢♡♠" |
// An attempted solution to the following problem: | |
// Given a sorted array of distinct integers A[1, . . . , n], | |
// you want to find out whether there is an index i for which A[i] = i. | |
// Give a divide-and-conquer algorithm that runs in time O(log n). | |
// Taken from 'Algorithms', by S. Dasgupta, C. H. Papadimitriou, and U. V. Vazirani, 2006. | |
// NB. It would be easy enough to implement this with a while loop, | |
// but since the questions asks for a D&C solution, explicit |
/* | |
** Draw Maze as ascii | |
*/ | |
void | |
drawMaze(Graph *g, int n) { | |
int side_length = 2*n+1; | |
char wall = '%'; | |
char passage = ' '; | |
char ascii_maze[side_length][side_length]; |
SELECT DISTINCT | |
ItemName | |
FROM | |
Item | |
INNER JOIN | |
Delivery ON Delivery.ItemID = Item.ItemID | |
# Where the item has been delivered by a supplier which delivers | |
# all items of type N | |
WHERE | |
SupplierID IN (SELECT DISTINCT |