Skip to content

Instantly share code, notes, and snippets.

Building Ax Studios

Chandraprakash Darji Chandraprakash-Darji

Building Ax Studios
View GitHub Profile
// Author: Chandraprakash Darji
// Github:
// Question: Describe abstract class called Shape which has three subclasses say Triangle, Rectangle, Circle.
// Define one method area() in the abstract class and override this area() in these three subclasses to calculate for specific object i.e., area() of Triangle subclass should calculate area of triangle etc.
// Same for Rectangle and Circle
import java.util.Scanner;
public class Abs {
public static void main(String[] args) {
Chandraprakash-Darji /
Created February 13, 2022 17:51
Stack implementation with Linked List
"""Add a couple methods to our LinkedList class,
and use that to implement a Stack.
You have 4 functions below to fill in:
insert_first, delete_first, push, and pop.
Think about this while you're implementing:
why is it easier to add an "insert_first"
function than just use "append"?"""
class Element(object):
Chandraprakash-Darji /
Created February 13, 2022 14:29
Python Code for Implementation of linked list
"""The LinkedList code from before is provided below.
Add three functions to the LinkedList.
"get_position" returns the element at a certain position.
The "insert" function will add an element to a particular
spot in the list.
"delete" will delete the first element with that
particular value.
Then, use "Test Run" and "Submit" to run the test cases
at the bottom."""
Chandraprakash-Darji / palindrome.js
Last active January 29, 2022 06:34
Return true if the given string is a palindrome. Otherwise, return false. A palindrome is a word or sentence that's spelled the same way both forward and backward, ignoring punctuation, case, and spacing.
View palindrome.js
"use strict";
function palindrome(str) {
let pureStr = "";
const letterNumber = /^[0-9a-zA-Z]+$/;
for (const letter of str) {
if (letter === " " || !letter.match(letterNumber)) continue;
else pureStr += letter.toLowerCase();
let res = false;
for (let i = 0; i < pureStr.length / 2; i++) {
Chandraprakash-Darji /
Last active January 29, 2022 16:12
Complte javscript advance Notes
Chandraprakash-Darji / numberToRomanInJS.js
Last active January 29, 2022 06:05
Convert any number to Roman Number By Javascript and Python
View numberToRomanInJS.js
"use strict";
const divideTheNumberInParts = function (number) {
const numberInList = [];
for (let i = 0; i < number.length; i++) {
const numberInPattern = [];
for (let numberMark = 0; numberMark < numberInList.length; numberMark++) {
let tempNumber = "";
let temp = 0;