Skip to content

Commit 3e6c30f

Browse files
SUDO PLACEMENT 2019
1 parent 8e1441c commit 3e6c30f

File tree

1 file changed

+154
-0
lines changed

1 file changed

+154
-0
lines changed

GeeksForGeeks/sudo placement 2019.ipynb

+154
Original file line numberDiff line numberDiff line change
@@ -3005,6 +3005,160 @@
30053005
" n=int(input())\n",
30063006
" print(int(do(n)))"
30073007
]
3008+
},
3009+
{
3010+
"cell_type": "code",
3011+
"execution_count": 22,
3012+
"metadata": {},
3013+
"outputs": [
3014+
{
3015+
"name": "stdout",
3016+
"output_type": "stream",
3017+
"text": [
3018+
"1\n",
3019+
"5\n",
3020+
"3 4 5 1 2\n",
3021+
"5 4\n"
3022+
]
3023+
}
3024+
],
3025+
"source": [
3026+
"for _ in range(int(input())):\n",
3027+
" n=int(input())\n",
3028+
" a=list(map(int,input().split()))\n",
3029+
" print(max(a),end=' ')\n",
3030+
" b=a.copy()\n",
3031+
" _max=max(a)\n",
3032+
" print(_max)\n",
3033+
" if a.index(_max)==0:\n",
3034+
" print(2)\n",
3035+
" elif a.index(_max)==(len(a)-1):\n",
3036+
" print(1)\n",
3037+
" elif "
3038+
]
3039+
},
3040+
{
3041+
"cell_type": "code",
3042+
"execution_count": 23,
3043+
"metadata": {},
3044+
"outputs": [],
3045+
"source": [
3046+
"a=[3,4,5,1,2]"
3047+
]
3048+
},
3049+
{
3050+
"cell_type": "code",
3051+
"execution_count": 24,
3052+
"metadata": {},
3053+
"outputs": [],
3054+
"source": [
3055+
"b=a.copy()"
3056+
]
3057+
},
3058+
{
3059+
"cell_type": "code",
3060+
"execution_count": 25,
3061+
"metadata": {},
3062+
"outputs": [
3063+
{
3064+
"data": {
3065+
"text/plain": [
3066+
"2"
3067+
]
3068+
},
3069+
"execution_count": 25,
3070+
"metadata": {},
3071+
"output_type": "execute_result"
3072+
}
3073+
],
3074+
"source": [
3075+
"b.index(5)"
3076+
]
3077+
},
3078+
{
3079+
"cell_type": "code",
3080+
"execution_count": 13,
3081+
"metadata": {},
3082+
"outputs": [],
3083+
"source": [
3084+
"b.sort(reverse=True)"
3085+
]
3086+
},
3087+
{
3088+
"cell_type": "code",
3089+
"execution_count": 15,
3090+
"metadata": {},
3091+
"outputs": [],
3092+
"source": [
3093+
"a.sort(reverse=True)"
3094+
]
3095+
},
3096+
{
3097+
"cell_type": "code",
3098+
"execution_count": 16,
3099+
"metadata": {},
3100+
"outputs": [
3101+
{
3102+
"data": {
3103+
"text/plain": [
3104+
"[5, 4, 3, 2, 1]"
3105+
]
3106+
},
3107+
"execution_count": 16,
3108+
"metadata": {},
3109+
"output_type": "execute_result"
3110+
}
3111+
],
3112+
"source": [
3113+
"a"
3114+
]
3115+
},
3116+
{
3117+
"cell_type": "code",
3118+
"execution_count": 17,
3119+
"metadata": {},
3120+
"outputs": [
3121+
{
3122+
"data": {
3123+
"text/plain": [
3124+
"[5, 4, 3, 2, 1]"
3125+
]
3126+
},
3127+
"execution_count": 17,
3128+
"metadata": {},
3129+
"output_type": "execute_result"
3130+
}
3131+
],
3132+
"source": [
3133+
"b"
3134+
]
3135+
},
3136+
{
3137+
"cell_type": "code",
3138+
"execution_count": 18,
3139+
"metadata": {},
3140+
"outputs": [
3141+
{
3142+
"data": {
3143+
"text/plain": [
3144+
"True"
3145+
]
3146+
},
3147+
"execution_count": 18,
3148+
"metadata": {},
3149+
"output_type": "execute_result"
3150+
}
3151+
],
3152+
"source": [
3153+
"a==b"
3154+
]
3155+
},
3156+
{
3157+
"cell_type": "code",
3158+
"execution_count": null,
3159+
"metadata": {},
3160+
"outputs": [],
3161+
"source": []
30083162
}
30093163
],
30103164
"metadata": {

0 commit comments

Comments
 (0)