Skip to content

Releases: DrakeSeteraO/Memory-Sort

Version 5.1

22 Jan 00:49
853cc6c

Choose a tag to compare

Added the ability to sort a string's characters and return a string of the sorted characters if a string is inserted into the lst variable. Also, reordered the modes list in the doc string for memory sort so that the modes are in alphabetical order.

Version 5

22 Jan 00:38
95d5a2f

Choose a tag to compare

Added the ability to sort a list containing float values utilizing memory and the built-in quick sort algorithm. Also, designed a more effective way to sort strings using recursion and memory. Finally, there are some slight modifications to method descriptions.

Added
-mode = 'f'
-mode = 'float'
-new way to sort strings uses mode = 's' or 'str'
-renamed the old string sorted method to mode = 'a' or mode = 'ascii'
-changed some of the method's description

Version 4.0.1

04 Dec 16:49
58c0d6f

Choose a tag to compare

Fixed some typos and wrong version number in doc string

Version 4

04 Dec 16:39
4fcb4a9

Choose a tag to compare

Added the ability to sort strings! However, it will often cause a memory error if the strings are longer than 4 characters. Also removed the type parameter. Instead, it views the first item in a list and uses the right algorithm based on the first element type.

Added
-mode = 's'
-mode = 'str'

Version 3.2

03 Dec 18:16
157da85

Choose a tag to compare

Slightly improved performance rate. Also made Memorysort more user-friendly. Instead of inputting 'c' into memory sort you can now do 'chr'. So now, to sort a list of characters, you can do any of the following "memorySort(lst,'c')", "memorySort(lst,'chr')", or "MemorySortC(lst)". Also added a feature where you can instead of setting mode = to the string of the type you can set type = the variable type you are sorting (currently only works with type int).

List of new parameters
mode = 'int'
mode = 'chr'
mode = 'None'
type = int

Version 3.1

26 Nov 03:39
b618e96

Choose a tag to compare

Changed the sorted list of strings to characters because it raises an error when the string has more than one element. This means that you can no longer call memorySortS() or memorySort(lst,'s'). Instead if you want a list of character to be sorted you can call memorySortC() or memorySort(lst,'c').

Version 3

26 Nov 00:07
c0d278c

Choose a tag to compare

Added a lot more features!
Memory sort now has variants, to do the normal memory sort, you can call memorySort(lst) or now memorySort(lst,'i'). The new parameter is the mode. By default, it is 'i', but by using 'n' it will sort the list if your elements are non-repeating and all the element values will be next to each other. 'n' does the original memory sort. Another new feature is 's' which does memory sort if all the elements in the list are strings and then returns a list of the sorted strings. Also if you don't want to use mode you can use any of the methods by instead capitalizing that letter at the end of the method name. For example "memorySort(lst,'s')" will do the same thing as "memorySortS(lst)".

Features
-Added modes 'i', 'n', and 's'
-Added memorySortI() which is the normal memory sort
-Added memorySortN() which sorts a list if there are no repeating integers and no gaps
-Added memorySortS() which sorts a list of string elements

Version 2.4

20 Nov 22:09
b3d1e65

Choose a tag to compare

Drastically speeds runtime by replacing a dictionary with a list.
-Removed dictionary
-Takes about 1/3rd the time of version 2.3

Version 2.3

14 Nov 05:31
4f81274

Choose a tag to compare

Slightly Optimized Runtime by using type hinting and more efficient addition

Version 2.2

13 Nov 19:00
7530d2b

Choose a tag to compare

Made code more user friendly
-Added Doc string
-Mostly follows PEP8 standard