Skip to content

Instantly share code, notes, and snippets.

View samflab's full-sized avatar
🎯
Focusing

Masudha Meher samflab

🎯
Focusing
View GitHub Profile
@samflab
samflab / App.css
Created July 20, 2021 13:05
App.cs file for Cash Register Manager
.App {
display: flex;
flex-direction: column;
align-items: center;
font-family: monospace;
}
.heading {
padding-top: 20vh;
font-size: xx-large;
}
@samflab
samflab / App.js
Created July 20, 2021 12:43
App.js file with the form
<div className="form">
<label>Bill</label>
<input type="number" placeholder="0"></input>
<br />
<label>Cash Given</label>
<input type="number" placeholder="0"></input>
<br />
<button>Return Change</button>
</div>
@samflab
samflab / App.js
Created July 20, 2021 12:36
App.js file with a little structure through div tags
import "./App.css";
function App() {
return (
<div className="App">
<h1 className="heading">Cash Register Manager</h1>
<div className="cash-register">
<div className="form">
</div>
@samflab
samflab / App.js
Created July 20, 2021 12:26
App.js file after project setup, first step
import "./App.css";
function App() {
return (
<div className="App">
</div>
);
}
@samflab
samflab / spmn.cpp
Created April 14, 2021 12:50
Smallest Positive Missing Number in an Unsorted Array Code
int findMissing(int arr[], int n) {
for(int i = 0; i < n; i++){
//looking for all the conditions
while(arr[i] >= 1 && arr[i] <= n && arr[i] != arr[arr[i]-1])
swap(arr[i], arr[arr[i]-1]);
}
//to check our missing number. For explaination, refer the article.
for(int i = 0; i < n; i++){
if(arr[i] != i + 1)
return i + 1;