{"push_id":1429426673,"size":1,"distinct_size":1,"ref":"refs/heads/master","head":"749e27024bed43d439118d80af79912381efc07c","before":"0bbb1227004722d2fe3d8713b58bfb250c170a9f","commits":[{"sha":"749e27024bed43d439118d80af79912381efc07c","author":{"name":"ssccinng","email":"9be73554ee5bb77583884901ffef148b94a953cd@163.com"},"message":"1066. Root of AVL Tree (25)\n\nAn AVL tree is a self-balancing binary search tree. In an AVL tree, the heights of the two child subtrees of any node differ by at most one; if at any time they differ by more than one, rebalancing is done to restore this property. Figures 1-4 illustrate the rotation rules.\r\n\r\n    \r\n    \r\nNow given a sequence of insertions, you are supposed to tell the root of the resulting AVL tree.\r\n\r\nInput Specification:\r\n\r\nEach input file contains one test case. For each case, the first line contains a positive integer N (<=20) which is the total number of keys to be inserted. Then N distinct integer keys are given in the next line. All the numbers in a line are separated by a space.\r\n\r\nOutput Specification:\r\n\r\nFor each test case, print ythe root of the resulting AVL tree in one line.\r\n\r\nSample Input 1:\r\n5\r\n88 70 61 96 120\r\nSample Output 1:\r\n70\r\nSample Input 2:\r\n7\r\n88 70 61 96 120 90 65\r\nSample Output 2:\r\n88","distinct":true,"url":"https://api.github.com/repos/ssccinng/PAT-A-solve/commits/749e27024bed43d439118d80af79912381efc07c"}]}
{"actor":{"display_login":"ssccinng"}}