C++
def dfs(node, visited):
  if node in visited: return
  visited.add(node)
  for child in graph[node]:
    dfs(child, visited)
Java
Codeforces
O(N log N)
Go
int l = 0, r = n - 1;
while (l <= r) {
  int m = l + (r - l) / 2;
  if (arr[m] == x) return m;
  if (arr[m] < x) l = m + 1;
  else r = m - 1;
}
Python
DP[i][j]
CodeChef
Rust
LeetCode
priority_queue<pii, vector<pii>, greater<pii>> pq;
pq.push({0, start});
while(!pq.empty()){
    int u = pq.top().second;
    pq.pop();
}
DA

Login

Welcome back to the Arena.

OR
Continue with Google

Authentication Module

Secure Access Required