title: big O complexity O(n log n) vs O(n log m)
body: <p>I have an algorithm that takes a DAG graph that has <code>n</code> nodes and for every node, it does a binary search on its adjacency nodes. To the best of my knowledge, this would be a <code>O(n log n)</code> algorithm however since the <code>n</code> inside the log corresponds only to the adjacency of a node I was wondering if this would become rather <code>O(n log m)</code>. By <code>m</code> I mean the <code>m</code> nodes adjacent to each node (which would intuitively and often be much less than <code>n</code>).</p>
  
  <p>Why not <code>O(n log m)</code>? I would say <code>O(n log m)</code> doesn't make sense because <code>m</code> is not technically a size of the input, <code>n</code> is. Besides, worst-case scenario the <code>m</code> can be <code>n</code> since a node could easily be connected to all others. Correct? </p>