Skip to content

Instantly share code, notes, and snippets.

@AlexandraBeautyman
AlexandraBeautyman / sortingArrayOfString.md
Last active October 17, 2022 08:12
Sorting each string in an array of strings, then sorting the whole array

Prompt

First, write an algorithm that takes in an array of strings, sorts each string, and then sorts the full array. Second, calculate the time complexity (Big O) of this algorithm.

Approach

To sort each individual string in the array, we would start by looping through the whole array, sorting each string element, and either replacing the strings in the original array with their sorted versions, or building a new array with the sorted strings.

Then, to sort the whole array, we would perform some sorting function on it.

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH