xxxxxxxxxx
npx @react-native-community/cli init PrOjEcTnAmE
xxxxxxxxxx
$ npm i -g create-react-native-app
$ create-react-native-app my-project
$ cd my-project
$ npm start
xxxxxxxxxx
// the most comman way of starting a react native app is,
npx create-expo-app YourApp
// as of 6th july 2023 it has many deprecated dependencies
// run
npm audit
//if it shows any vulnerability consider using
npx create-react-native-app YourApp
// and selecting expo template
xxxxxxxxxx
#https://github.com/paulnegz/sorts-py/blob/main/sort.py
def quick_sort(array :list)->list:
def _quick_sort(array :list)->list:
if len(array)<=1: return array
pivot, is_bigger = array.pop(), lambda x: x>pivot
left_partition = _quick_sort([x for x in array if not is_bigger(x)])
right_partition = _quick_sort([x for x in array if is_bigger(x)])
return [*left_partition, pivot, *right_partition]
return _quick_sort(array)
arr = [7, 2, 4, 0, 1, 5, 8, 3, 2, 0]
print(quick_sort(arr)) # [0, 0, 1, 2, 2, 3, 4, 5, 7, 8]