akhilkanike Goto Github PK
Type: User
Type: User
starter project for deploying an Airnode and making requests to it
A collection of easy-to-understand guides to programming tools
Basic projects on MachineLearning
Naren is peculiar about color of candies Little Naren is very peculiar about colors. On his birthday, his mom wanted to buy candies for eating. So she asked him about his color preferences. The sophisticated little person that Naren is, he likes only two colors — amber and brass. His mom bought n candies, each of which was either amber or brass in color. You are provided this information in a string s consisting of characters 'a' and 'b' only, where 'a' denotes that the candy is amber, where 'b' denotes it being brass colored. When Naren saw the candies, he was furious with anger as he wanted all the balloons of the same color. In his anger, he painted some of the candies with the opposite color (i.e., he painted some amber ones brass and vice versa) to make all candies appear to be the same color. As he was very angry, it took him a lot of time to do this, but you can probably show him the right way of doing so, thereby teaching him a lesson to remain calm in difficult situations, by finding out the minimum number of candies needed to be painted in order to make all of them the same color. Input • The first line of input contains a single integer T, denoting the number of test cases. • The first and only line of each test case contains a string s. Output • For each test case, output a single line containing an integer — the minimum number of flips required. Example Input: 3 ab bb baaba Output: 1 0 2 Explanation In the first example, you can change amber to brass or brass to amber. In both the cases, both the candies will have same colors. So, you will need to paint 1 candy. So the answer is 1. In the second example, As the color of all the balloons is already the same, you don't need to paint any of them. So, the answer is 0.
WebRTC Web demos and samples
Easy scroll animations for web and mobile browsers.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.