square-rectangle

- Blogathon, Blogathon-2021, Geometric, Linked List, Mathematical, Matrix, square-rectangle

Form a Rectangle from boundary elements of Matrix using Linked List

class Node:          def __init__(self, val):        self.data = val        self.next = None        self.prev = None        self.top = None        self.bottom = None    class LinkedList:          def __init__(self):        self.head = None              def Quad(self, grid,…

Read More