• Stars
    star
    3
  • Rank 3,963,521 (Top 79 %)
  • Language
    Python
  • Created about 3 years ago
  • Updated about 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Problem 1 : In the LinkedList class, add a method remove(n) to remove the specified node n from the list and return its element. You may assume the linked list contains the specified node. Then, add a swap_head_tail() method to swap the head and tail nodes (not just elements) in the linked list and a random_remove() method to randomly remove a node from the linked list and return its element. Problem 2 : Given a LinkedList of letters s, write the following functions: • join(s) to join all the letters together in the linked list and return the joined string. • remove_duplicate(s) to remove all the duplicate letters, join all the unique letters together, and return the joined string, for example, if the input linked list is ‘a’ → ‘c’ → ‘b’ → ‘a’ → ‘a’ → ‘c’ → ‘d’, your method should return “acbd” or “bacd”. • count_vowels(s) to return the number of vowels in the linked list. Problem 3 : Given two sorted SinglyLinkedList of integers, write a function • merge2lists(linked_list1, linked_list2) to merge the two linked lists into a new sorted linked list and return it For example: Before merging: list1: 2→11→19→21→23→24 list2: 3→9→15→16→22 After merging: 2→3→9→11→15→16→19→21→22→23→24 Problem 4 : In the DoublyLinkedList class, add the following public methods: • get_first() to return the first node (not the header) in the linked list • get_last() to return the last node (not the trailer) in the linked list ▪ contains(e) method to return true if the linked list contains a specified element e, false otherwise ▪ add_before(e, n) to insert the specified element e before that specified node n ▪ add_after(e, n) to insert the specified element e before that specified node n ▪ You may assume the linked list contains the specified node for add_before() and add_after()

More Repositories

1

job-for-me

Group project of the 3rd year focuses on the local freelancing platform
JavaScript
7
star
2

image-to-pencil-sketch-app

This app intent is to convert normal image to pencil sketch. Here I used libraries of streamlit, opencv
Python
6
star
3

Simple-CV-webPage

JavaScript
5
star
4

my-first-WPF-app

This is a very simple Windows Presentation Foundation (WPF) for beginner to get simple idea to build up desktop application
C#
5
star
5

Convert-Image_MATLAB

MATLAB program to convert the image into following formats. (a) Gray scale (b) Binary (c) Negative (d) R, G and B images
MATLAB
4
star
6

corpus-data-scrape

This is the first step of setting corpus data into Q&A
4
star
7

Efac-sportClub

Sport club website of Faculty of Engineering, University of Ruhuna
SCSS
4
star
8

RNN-PCR_Prediction

Here I use recurrent neural network to predict upcoming PCR test using this deep learning model
Jupyter Notebook
4
star
9

Java-notes

Here is my old java notes. fundamental to OOP
Java
4
star
10

hospital-management

4
star
11

ML-Salary-Prediction

Here, I train and test a machine learning model for salary prediction based on year of experience.
4
star
12

Sinhala_dataset

Here you get Sinhala chatbot question and answers dataset which is converted from cornell-movie-data set by using google translate
4
star
13

Strategy-Pattern-Java

In Strategy pattern, a class behavior or its algorithm can be changed at run time. This type of design pattern comes under behavior pattern.
Java
4
star
14

Sci-kit_Grid-search

I want to show you both how you can use the scikit-learn grid search capability and give you a suite of examples that you can copy-and-paste into your own project as a starting point.
Jupyter Notebook
4
star
15

Decorator-Pattern-Java

Decorator pattern allows a user to add new functionality to an existing object without altering its structure. This type of design pattern comes under structural pattern as this pattern acts as a wrapper to existing class.
Java
4
star
16

Hello-world-To-ML-mnist

The MNIST database of handwritten digits, available from this page, has a training set of 60,000 examples, and a test set of 10,000 examples. It is a subset of a larger set available from NIST. The digits have been size-normalized and centered in a fixed-size image.
Jupyter Notebook
4
star
17

flood-fill-algorithm-CPP

Here is the code for flood fill algorithm which can use for micro mouse robotic competition which has 12X12 grid.
C++
4
star
18

student-management-mongo-spring

Simple webapplication to practice mongo+springboot
Java
4
star
19

Observer-Pattern-Java

Observer pattern is used when there is one-to-many relationship between objects such as if one object is modified, its dependent objects are to be notified automatically. Observer pattern falls under behavioral pattern category.
Java
4
star
20

data-structure_python

Here I work with some data structures classes like LinkedList, DoublyLinkedList , Linked Stack , List Stack. Liked Queue and List Queue
Python
4
star
21

Adapter-Pattern-Java

Adapter pattern works as a bridge between two incompatible interfaces. This type of design pattern comes under structural pattern as this pattern combines the capability of two independent interfaces.
Java
4
star
22

Black-Knight

Chess Game
3
star
23

iresh-rajitha

Read me
3
star
24

Student-Management-System

Student Management System which aligned with best practices with design patterns such as SOLID principals, Unit testing, SonarQube analysis, etc.
Java
3
star
25

friends_joy_chatbot

3
star
26

AbstractFactoryPattern

Abstract factory pattern can use as a super factory when it has a subtype of common factories. This type of design pattern come under creational design pattern and one of the best way to produce an object
Java
3
star
27

Python-OOP---1

Create a class called Invoice that a hardware store might use to represent an invoice for an item sold at the store. An Invoice should include four pieces of information as instance variables‐a part number (type String), a part description (type String), a quantity of the item being purchased (type int) and a price per item (float). Your class should have a constructor that initializes the four instance variables. Provide a set and a get method for each instance variable. In addition, provide a method named getInvoiceAmount that calculates the invoice amount (i.e., multiplies the quantity by the price per item), then returns the amount as a float value. If the quantity is not positive, it should be set to 0. If the price per item is not positive, it should be set to 0.0. Write a test program named InvoiceTest that demonstrates class Invoice’s capabilities.
Python
3
star
28

Python-OOP-static-varaible

Create class SavingsAccount. Use a static variable annualInterestRate to store the annual interest rate for all account holders. Each object of the class contains a private instance variable savingsBalance indicating the amount the saver currently has on deposit. Provide method calculateMonthlyInterest to calculate the monthly interest by multiplying the savingsBalance by annualInterestRate divided by 12. This interest should be added to savingsBalance. Provide a static method modifyInterestRate that sets the annualInterestRate to a new value. Write a program named SavingsAccountTest to test class SavingsAccount. Instantiate two savingsAccount objects, saver1 and saver2, with balances of $2000.00 and $3000.00, respectively. Set annualInterestRate to 4%, then calculate the monthly interest and print the new balances for both savers. Then set the annualInterestRate to 5%, calculate the next month’s interest and print the new balances for both savers.
Python
3
star
29

Python-OOP-inheritance

1. Create a super class called Car. The Car class has the following fields and methods. int speed; float regularPrice; str color; float getSalePrice(); 2. Create a sub class of Car class and name it as Truck. The Truck class has the following fields and methods. int weight; float getSalePrice(); # If weight>2000, 10% discount. Otherwise, 20% discount. 3. Create a subclass of Car class and name it as Ford. The Ford class has the following fields and methods int year; int manufacturerDiscount; float getSalePrice(); # From the sale price computed from Car class, subtract the manufacturer discount. 4. Create a subclass of Car class and name it as Sedan. The Sedan class has the following fields and methods. int length; float getSalePrice(); # If length > 20 feet , 5% discount, Otherwise, 10% discount. 5. Create MyOwnAutoShop class which contains a main() method. Perform the following within the main() method. a. Create an instance of Sedan class and initialize all the fields with appropriate values. Use super(...) method in the constructor for initializing the fields of the superclass. b. Create two instances of the Ford class and initialize all the fields with appropriate values. Use super(...) method in the constructor for initializing the fields of the super class. c. Create an instance of Car class and initialize all the fields with appropriate values. Display the sale prices of all instance.
Python
3
star
30

Sinhala-Virtual-Assistant

This application is a Sinhala chatbot application which can virtually assist.
Jupyter Notebook
2
star
31

19th-Official

This website is used for grab batch detail,view each other details to each other and also admin panel is here to make notification. all admins are controller by super admin.
CSS
2
star
32

Employee-Management-spring-angular

Creative software exercise for the intern
1
star
33

Xbotix-2019-Registration-website

Regular Expression in javaScript to validate form,CSS and PDO used in PHP.
CSS
1
star