Skip to main content

Posts

Community Bonding Period LibreHealth GSOC 2021

Community-bonding- Hi, This is Mahavir. This is the very first blog that I am writing during the community bonding period. Today is 31 May and it’s been 13 days since the GSOC result was announced. So let’s have a look at how I spent the community bonding period till now. My Project- Improve LibreHealth Toolkit Cost of Care Explorer . the goal is to improve LibreHealth Toolkit Cost of care explorer. During GSOC 2020 this project came under development and this project is continuation and improving upon it. Bonding- In the first week of th e  community bonding period, I introduced myself at the LibreHealth forum. Total 5 students are selected for GSOC 21 program. In this period I communicate with my mentors and other students. Currently, This project working on the flutter 1.22.6 version, and my first task to upgrade this project to flutter the latest version and null safety. Till now I did some research about flutter's latest version and read about the latest version of dependencie

Defanging an IP Address leetcode solution

  Defanging an IP Address- Problem Statement- Given a valid (IPv4) IP  address , return a defanged version of that IP address. A  defanged IP address  replaces every period  "."  with  "[.]" .   Example 1: Input: address = "1.1.1.1" Output: "1[.]1[.]1[.]1" Example 2: Input: address = "255.100.50.0" Output: "255[.]100[.]50[.]0"   Constraints: The given  address  is a valid IPv4 address. code-

How to append char to end of string in C++ || Best way to append char to end of string

 How to append char to end of string in C++ || Best way to append char to end of string- There are 2 ways mention below to append char to the end of string in c++. But do you know which one is the best way?  Let's see Method -1  += operator we can use += use to append char at the end of the string but by using this method it makes a copy of the initial string and take O(length of the string ) time to make a copy of a string. Method 2- Push back method by using this method we do not create any copy of original string we only put char to the and of the string so the time complexity of this function is o(1). Obviously, push back is a better method to append char at the end of the string.

Prime Game February long challenge 2021 solution with code and explanation

 Prime Game February long challenge 2021 solution with code and explanation  - Problem statement - Chef and Divyam are playing a game with the following rules: First, an integer  X ! X !  is written on a board. Chef and Divyam alternate turns; Chef plays first. In each move, the current player should choose a positive integer  D D  which is divisible by up to  Y Y  distinct primes and does not exceed the integer currently written on the board. Note that  1 1  is not a prime. D D  is then subtracted from the integer on the board, i.e. if the integer written on the board before this move was  A A , it is erased and replaced by  A − D A − D . When one player writes  0 0  on the board, the game ends and this player wins. Given  X X  and  Y Y , determine the winner of the game. Input The first line of the input contains a single integer  T T  denoting the number of test cases. The description of  T T  test cases follows. The first and only line of each test case contains two space-sepa