As a newbie programmer
As a newbie programmer

As a newbie programmer

Sharing entry level codes. My snippets on GitHub https://github.com/locharp/code-snippets


Finding Nemo @ Dcoder

3 Apr 2023 1 minute read 0 comments Lochard

Problem: Nemo is a little kid in Word-World who always gets mixed in a group of other words and gets lost. Marlin and Coral (Nemo's parents) are quite desperate and called you for help every time Nemo got lost. You helped for the first few times but...

Change in Case @ Docder

2 Apr 2023 1 minute read 0 comments Lochard

Problem: You will be given a single string and two positive integers denoting indices. You need to change the case of the characters at those indices,i.e change uppercase to lowercase and lowercase to uppercase. It is guaranteed that all characters i...

Array Sum @ Dcoder

31 Mar 2023 1 minute read 0 comments Lochard

Problem: You are given an integer array and you have to find the sum of the elements of the array and find the remainder when the sum is divided by the largest number of the array. Input: First line contains N, the number of elements. Next line conta...

Split Screen Calculator (Style It Yourself)

22 Mar 2023 1 minute read 0 comments Lochard

You can try to use on my page's dev section. Source code including TypeScript code can be found in this repository. Instruction is on the README of the app folder. It is not styled. It is not thoroughly test. There are probably still bugs. There are...

Three's Company @ Dcoder

19 Mar 2023 1 minute read 0 comments Lochard

Problem: This problem requires you to create a output string from input string such that for every character in input string, there are three same characters in output string. Input: First line contains N, the number of letters in the string. The nex...

Degree Celsius @ Dcoder

18 Mar 2023 1 minute read 0 comments Lochard

Problem: Tom is a scientist. He uses huge machines for complex calculations. There is a problem, the machines takes input as Fahrenheit and Tom has the temperatures in Degree Celsius. As he is busy with his work, he asks your help to convert Degree C...

Happy String @ Dcoder

15 Mar 2023 1 minute read 0 comments Lochard

Problem: A happy string is a string in which each character is lexicographically greater than its next character. You are given a positive integer N as an input. You need to print the smallest lexicographical string possible of length N.NOTE: All cha...

Circle of Numbers @ Dcoder

13 Mar 2023 1 minute read 0 comments Lochard

Problem: All numbers in NumberLand are standing in a circle for a dancing ceremony. Every number needs a dancing partner. Dancing partner of any number is the number which is standing radially opposite to it in the circle. The numbers are from 0 to N...

Project Teams @ Dcoder

12 Mar 2023 1 minute read 0 comments Lochard

Problem: There are N students in a class and Teacher want to divide these students into some groups . Teacher told  that groups consisting of two or less students not allowed , so Teacher want to have as many groups consisting of three or more studen...

Leap Year @ Dcoder

11 Mar 2023 1 minute read 0 comments Lochard

roblem: Steve is playing a quiz game with his brother John. As Steve just learned the concept of leap year, John wanted to test his knowledge. For that, John started to ask Steve whether a year is a leap year or not by giving him a random year. Steve...