1. String Permutationshistorical

    Given a string, print all permutations of its characters in lexicographic order. For example, given the string abc, print all strings formed by a, b, and c in lexicographic order: abc, acb, bac, bca, cab, and cba.

  2. First Non-Repeating Character in a Character Streamhistorical

    Implement a function that finds the first character that appears only once in a character stream. For example, after reading only the first two characters "go", the first character that appears once is "g".

  3. Left Rotate Stringhistorical

    Assembly language has a shift instruction called rotate left (ROL). This task uses a string to simulate its result. Given a character sequence S, output the sequence after cyclically rotating it K positions to the left.

  4. Poker Straighthistorical

    Determine whether five playing cards can form a straight, allowing jokers to represent any number.

  5. Replace Spaceshistorical

    Implement a function that replaces every space in a string with "%20". For example, when the string is We Are Happy., the result after replacement is We%20Are%20Happy.

  6. Convert a String to an Integerhistorical

    Convert a string to an integer without using a library function that converts strings to integers. Return 0 if the value is 0 or if the string is not a valid numeric value.

  7. Reverse Word Orderhistorical

    Reverse the order of words in an English sentence while preserving the character order within each word.