Skip to content

Instantly share code, notes, and snippets.

View Prince-Shaikh's full-sized avatar

Moiz Shaikh Prince-Shaikh

View GitHub Profile
@Prince-Shaikh
Prince-Shaikh / index.js
Created September 18, 2021 11:36
simple node api
const express = require('express');
const app = express();
app.use(express.json);
const PORT = process.env.PORT || 8000;
app.listen(PORT, ()=>{
console.log(`[Server Started] Server is running on ${PORT}`);
});
const arr=[
@Prince-Shaikh
Prince-Shaikh / Weak2.java
Created April 18, 2019 12:05
Solution to the 2nd Weakly Programming Task
public class Weak2 {
/*
Q1. We have a number of bunnies and each bunny has two big floppy ears.
We want to compute the total number of ears across all the bunnies
recursively (without loops or multiplication).
bunnyEars(0) → 0
bunnyEars(1) → 2
bunnyEars(2) → 4