赞
踩
ASCII Character | Binary Representation |
A | b01000001 |
E | b01000101 |
S | b01010011 |
C | b01000011 |
H | b01001000 |
R | b01010010 |
X | b01011000 |
N | b01001110 |
Quadrant | x_new | y_new |
0 | y | x |
1 | x | y - w |
2 | x - w | y - w |
3 | w - y - 1 | w * 2 - x - 1 |
Points in a 2D space: | The data structure in memory: |
void insert(Point p, TreeNode * curr, bool is_x){ if(is_x){ if(p.x < curr->getX()){ follow_left_node(!is_x); } else { follow_right_node(!is_x); } } else { if(p.y < curr->getY()){ follow_left_node(!is_x); } else { follow_right_node(!is_x); } } }
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。