Giter Site home page Giter Site logo

deepak14ri / equality-in-array Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 3 KB

Given an array of integers, determine the minimum number of elements to delete to leave only elements of equal value. Example arr= [1,2,2,3] Delete the 2 elements 1 and 3 leaving arr as [2,2]. If both twos plus either the 1 or the 3 are deleted, it takes 3 deletions to leave either [3] or [1]. The minimum number of deletions is . 2 Input Format The first line contains an integer n, the number of elements in arr. The next line contains n space-separated integers arr[i]. Constraints 0<n<=100 1<=arr[i]<=100 Sample Input 5 3 3 2 1 3

equality-in-array's Introduction

my stats

I'm a self-taught passionate MERN Stack Developer from India ๐Ÿ‡ฎ๐Ÿ‡ณ

About me

  • โค๏ธ I love writing JavaScript, TypeScript, Python, and building fun experiments on type-level
  • ๐Ÿ’ฌ Ask me about anything here
my stats Top Langs

equality-in-array's People

Contributors

deepak14ri avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.