arrays

package
v0.0.0-...-ba76322 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ColumnWith1

func ColumnWith1(arr [][]int) int

func CountSquares

func CountSquares(matrix [][]int) int

func DeckRevealedIncreasing

func DeckRevealedIncreasing(deck []int) []int

Incorrect solution

func FindKthLargest

func FindKthLargest(nums []int, k int) int
Quicksort in descending order

take K-1 as the pivot note sorting should be in descending order pivot value = nums[k find element less than pivot from left = increment i till nums[i] > pivotVal find element greater than pivot from right = decrement j till nums[j] < pivotval

func FindMinFibonacciNumbers

func FindMinFibonacciNumbers(k int) int

func GenerateMatrixII

func GenerateMatrixII(n int) [][]int

func LengthOfLongestSubstring

func LengthOfLongestSubstring(s string) int

func MaxArea

func MaxArea(heights []int) int

func MaxAreaOfIsland

func MaxAreaOfIsland(grid [][]int) int

func NumOfSubarraysGreaterThanAvg

func NumOfSubarraysGreaterThanAvg(arr []int, k int, threshold int) int

func NumTimesAllBlue

func NumTimesAllBlue(light []int) int

2,1,3,5,4

func PancakeSort

func PancakeSort(A []int) []int

func ProcessQueries

func ProcessQueries(queries []int, m int) []int

func ProductExceptSelf

func ProductExceptSelf(nums []int) []int

func SearchMatrix

func SearchMatrix(matrix [][]int, target int) bool

func Subsets

func Subsets(nums []int) [][]int

func ThreeSum

func ThreeSum(nums []int) [][]int

Types

This section is empty.

Jump to

Keyboard shortcuts

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