Given that $P$ denotes a set of point, the pseudocode shown below checks if lines are collinear by checking if the point $p$,$q$, and $r$ are collinear, where $q$ is the central point, by checking if the the slopes of the segments $\overline { pq }$ and $\overline { qr }$ are identical.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 

What is the worst case running time of the algorithm?
The following text file contains a set of triplets. Each triplets contains three integers $x,y,R$, representing a circle of radius $R$ centered at $(x,y)$. Out of each pair of circles in the file, how may of them intersect?
How many of the pairs of line segments in this text file intersect?
Details and assumption