Skip to content

Instantly share code, notes, and snippets.

@yogesh-desai
yogesh-desai / FindMaximumPossibleNumberByDeletingDigit5.go
Last active October 7, 2021 16:45
Write a function solution that, given an integer N, returns the maximum possible value obtained by inserting one '5' digit inside the decimal representation of integer N. if N= 5859 output= 589. if N= -5859 output= -859 If N = -5000 ouput =0
package main
import (
"fmt"
"strconv"
)
func main() {
fmt.Println(Solution(-5000))