Skip to content

Commit 5c0e83d

Browse files
committed
started medium #1329
1 parent 30b7e99 commit 5c0e83d

File tree

1 file changed

+42
-4
lines changed

1 file changed

+42
-4
lines changed

leetcode_kuro_RnD.ipynb

Lines changed: 42 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9133,14 +9133,15 @@
91339133
},
91349134
{
91359135
"cell_type": "code",
9136-
"execution_count": 114,
9136+
"execution_count": 49,
91379137
"metadata": {},
91389138
"outputs": [
91399139
{
91409140
"name": "stdout",
91419141
"output_type": "stream",
91429142
"text": [
9143-
"i am offline and i have to wait till the internet connection is back!\n"
9143+
"999\n",
9144+
"not Continuous\n"
91449145
]
91459146
}
91469147
],
@@ -9150,10 +9151,47 @@
91509151
"# --- HARD HARD HARD ---\n",
91519152
"\n",
91529153
"\n",
9153-
"print(\"i am offline and i have to wait till the internet connection is back!\")\n",
9154+
"# print(\"i am offline and i have to wait till the internet connection is back!\")\n",
91549155
"\n",
91559156
"nums = [1,10,100,1000]\n",
9156-
"\n"
9157+
"# nums = [1,2,3,5,6]\n",
9158+
"# nums = [4,2,5,3]\n",
9159+
"\n",
9160+
"nums.sort()\n",
9161+
"\n",
9162+
"max_diff = max(nums) - min(nums)\n",
9163+
"\n",
9164+
"print(max_diff)\n",
9165+
"if max_diff == len(nums)-1 and len(nums) == len(set(nums)): \n",
9166+
" print('Continuous')\n",
9167+
"else: \n",
9168+
" print('not Continuous')\n"
9169+
]
9170+
},
9171+
{
9172+
"cell_type": "code",
9173+
"execution_count": 50,
9174+
"metadata": {},
9175+
"outputs": [
9176+
{
9177+
"name": "stdout",
9178+
"output_type": "stream",
9179+
"text": [
9180+
"[11, 25, 66, 1, 69, 7]\n",
9181+
"[23, 55, 17, 45, 15, 52]\n",
9182+
"[75, 31, 36, 44, 58, 8]\n",
9183+
"[22, 27, 33, 25, 68, 4]\n",
9184+
"[84, 28, 14, 11, 5, 50]\n"
9185+
]
9186+
}
9187+
],
9188+
"source": [
9189+
"# 1329 : https://leetcode.com/problems/sort-the-matrix-diagonally/\n",
9190+
"\n",
9191+
"mat = [[11,25,66,1,69,7],[23,55,17,45,15,52],[75,31,36,44,58,8],[22,27,33,25,68,4],[84,28,14,11,5,50]]\n",
9192+
"\n",
9193+
"for val in mat: \n",
9194+
" print(val)"
91579195
]
91589196
},
91599197
{

0 commit comments

Comments
 (0)