Is this number a hill number? A hill number is a number that has the same digit in the first &amp; the last, but that's not all. In a hill number the first digits are strictly increasing until the largest digit, and after the largest digit, the last digits are strictly decreasing. The largest digit can be repeated but consecutively only, meaning no gaps by smaller numbers.

Here is an example of a hill number:

12377731 | 1237...             | ...731
^ same ^ | strictly increasing | strictly decreasing 
---------+---------------------+---------------------
12377731
   ^^^ okay because largest digit can be repeated


This is not:

4588774 | ...8774
        |     ^^ not the largest digit
        |        so this has to be strictly decreasing
        |        but it's not, so not a hill number


Challenge

Given a positive integer, write a full program or a function that returns truthy for hill numbers but falsy on other values.

Notes:


Input &amp; output can be in any reasonable format.
This is code-golf so shortest answer in each language wins!


Test Cases

12321 -&gt; Truthy
1233321 -&gt; Truthy
99 -&gt; Truthy
3 -&gt; Truthy
234567992 -&gt; Truthy
5555555 -&gt; Truthy
1232 -&gt; Falsy
778896 -&gt; Falsy
23232 -&gt; Falsy
45566554 -&gt; Falsy
5645 -&gt; Falsy
Jelly, 8 bytes

_ƝṠÞ+SƊƑ


Try it online!

How it works

_ƝṠÞ+SƊƑ  Main link. Argument: n (integer)

_Ɲ        Take the differences of neighboring digits.
          This maps n = abcd to [a-b, b-c, c-d].
       Ƒ  Fixed; apply the link to the left and return 1 if the result is equal to
          its argument, 0 if not.
      Ɗ       Drei; combine the three links to the left into a monadic chain.
  ṠÞ              Sort the differences by their signs (negative, zero, positive).
     S            Take the sum of the differences, yielding 0 if and only if the
                  first digit is equal to the last.
    +             Add the sum to each difference.