reversestring

package
v0.0.0-...-b9f9a78 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 12, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReverseString

func ReverseString(s []byte)

ReverseString is O(n)

func ReverseString1

func ReverseString1(s []byte)

ReverseString1 use Golang multi-valued assignment what's the strategy underneeth? the memory is observed similar to function above, and slower.

func ReverseString2

func ReverseString2(s []byte)

ReverseString2 use XOR algorithm The result is the same as the #0 approach. I was expecting it can save some memory...

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL