arrayTest

package
v0.0.0-...-9fd3fd3 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrintTestResult

func PrintTestResult(t *testing.T, functionName string, result, expected []int, successMessage, failureMessage string)

Common function to print the test result

func RunDeleteElementTest

func RunDeleteElementTest(t *testing.T, numbers []int, deletedIndex int, afterDeletingValue []int)

RunDeleteElementTest runs tests for deleting an element from the array

func RunInsertElementTest

func RunInsertElementTest(t *testing.T, numbers []int, indexingValue int, targetedIndex int, afterIndexingValue []int)

RunInsertElementTest runs tests for inserting an element into the array

func RunLargestNumber

func RunLargestNumber(t *testing.T, numbers []int, largestNumber int)

RunLargestNumber runs tests for getting the largest value

func RunLeadersInAnArray

func RunLeadersInAnArray(t *testing.T, numbers []int, expected []int)

RunLeadersInAnArray runs tests for getting the leader list value on the array

func RunLeftRotateArrayByOneTest

func RunLeftRotateArrayByOneTest(t *testing.T, numbers []int, expected []int)

RunLeftRotateArrayByOneTest runs tests for left rotating an array by one position

func RunMaxProfit

func RunMaxProfit(t *testing.T, numbers []int, maxProfit int)

MaxProfit runs tests for getting the maximum profit

func RunMaximumDifference

func RunMaximumDifference(t *testing.T, numbers []int, maximumDifference int)

RunMaximumDifference runs tests for getting the maximum diffrence value

func RunMoveAllZEROSToEnd

func RunMoveAllZEROSToEnd(t *testing.T, numbers []int, expected []int)

RunMoveAllZEROSToEnd runs tests for moving the all zeros arrays last

func RunRemoveDuplicatesValuesFromArray

func RunRemoveDuplicatesValuesFromArray(t *testing.T, numbers []int, expected []int)

RunRemoveDuplicatesValuesFromArray runs tests for removing duplicates value

func RunReverseElementTest

func RunReverseElementTest(t *testing.T, numbers []int, afterReversingArray []int)

RunReverseElementTest runs tests for array reversal functions

func RunSecondLargestNumber

func RunSecondLargestNumber(t *testing.T, numbers []int, secondLargestNumber int)

RunSecondLargestNumber runs tests for getting the second largest value

Types

This section is empty.

Jump to

Keyboard shortcuts

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