I am preparing for a job interview, where this kind of puzzles are given to all participants. I am struggling to find some logic in it. I would really appreciate any advice on how to approach this kind of puzzles.

The aim is to find a missing number (integer) an put it instead of the question mark.

Here are 2 examples I have been unsuccessfully trying to solve for 2 days.

1)

[![puzzle n. 1][1]][1]


2) 

[![puzzle n. 2][2]][2]


  [1]: https://i.sstatic.net/B4Mo9.png
  [2]: https://i.sstatic.net/SIm58.png