Adam_Jardali's blog

By Adam_Jardali, 4 weeks ago, In English

Approach to Detect Cycles in a Graph

Idea
Solution using DFS
Solution using BFS

Tom Riddle's Diary

Idea

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By Adam_Jardali, 5 weeks ago, In English

Heap Sort

$$$Important$$$ $$$Note$$$: in this problem k is small as it is the min(n,1000). We should take advantage of this fact to solve the problem in an efficient way.

Solution Using Sorting
Solution Using Heap Sort
Solution Using Priority Queue

You Know Who

Hermione is busy now, So we need an efficient solution!

Solution
Code

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By Adam_Jardali, history, 7 weeks ago, In English

Hadi & Math

What is the Sum of the numbers from 1 ... n

hint

Knowing the actual sum and the excepted sum, how to find the missing sum?

solution
tip

Michael And The Easy A

hint 1
hint 2
hint 3

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it