So Kacim L.,
The definition of "function" is that, for each individual value of x, there is ONLY ONE value of y associated. So the first graph qualifies, but the second does not.
By "the inverse of the graph", I'm assuming that means exchanging the x and y axis labels, and rotating the graph into proper position. (Or, you could reflect across the x=y line). Then, the second graph (as inverted) qualifies, but the first does not.
Functions are by definition one-to-one. But if one-to-one is also required for the inverse function, then neither of these graphs qualifies. That would require a monotonically increasing or decreasing function (which could include individual, isolated points of zero slope). Think about this (sketch if needed) until you see why that is.
--Cheers, --Mr. d.