Skip to main content
edited tags
Link
Jamal
  • 34.9k
  • 13
  • 133
  • 237
added 4 characters in body; edited title
Source Link
palacsint
  • 29.9k
  • 9
  • 81
  • 156

how can i make this code run faster for large input for Better sorting the list in python 2.7speed

import sys

import sys

x=int(sys.stdin.readline())

lst = [int(sys.stdin.readline()) for i in xrange(x)]

lst.sort()

print lst 

#howHow can iI make this code faster for large input?

how can i make this code run faster for large input for sorting the list in python 2.7

import sys

x=int(sys.stdin.readline())

lst = [int(sys.stdin.readline()) for i in xrange(x)]

lst.sort()

print lst 

#how can i make this code faster for large input

Better sorting speed

import sys

x=int(sys.stdin.readline())

lst = [int(sys.stdin.readline()) for i in xrange(x)]

lst.sort()

print lst 

How can I make this code faster for large input?

edited title
Link
shubham
  • 361
  • 2
  • 3
  • 7

how can i make this code run faster for large input for sorting the list in python 2.7

Source Link
shubham
  • 361
  • 2
  • 3
  • 7
Loading