{"id":20916386,"url":"https://github.com/akshaypratapsingh09/dev-revival","last_synced_at":"2026-07-02T23:34:02.261Z","repository":{"id":218971644,"uuid":"747335796","full_name":"AkshayPratapSingh09/Dev-Revival","owner":"AkshayPratapSingh09","description":null,"archived":false,"fork":false,"pushed_at":"2026-01-02T17:57:58.000Z","size":252,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-03T14:17:20.896Z","etag":null,"topics":["algorithms","competitive-programming","data-structures","dsa","optimization-algorithms"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AkshayPratapSingh09.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-01-23T18:18:38.000Z","updated_at":"2026-01-02T17:58:02.000Z","dependencies_parsed_at":"2024-01-24T19:40:34.314Z","dependency_job_id":"f40f8127-82a0-4e74-bf77-98213816f90e","html_url":"https://github.com/AkshayPratapSingh09/Dev-Revival","commit_stats":null,"previous_names":["akshaypratapsingh09/dev-revival"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AkshayPratapSingh09/Dev-Revival","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AkshayPratapSingh09%2FDev-Revival","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AkshayPratapSingh09%2FDev-Revival/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AkshayPratapSingh09%2FDev-Revival/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AkshayPratapSingh09%2FDev-Revival/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AkshayPratapSingh09","download_url":"https://codeload.github.com/AkshayPratapSingh09/Dev-Revival/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AkshayPratapSingh09%2FDev-Revival/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35067031,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-02T02:00:06.368Z","response_time":173,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithms","competitive-programming","data-structures","dsa","optimization-algorithms"],"created_at":"2024-11-18T16:22:47.736Z","updated_at":"2026-07-02T23:34:02.243Z","avatar_url":"https://github.com/AkshayPratapSingh09.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# DSA Daily Practice From Different Sources \n- Arrays\n- LinkedList\n- Graphs\n- Queue/Stacks\n\n\n# Stack Data Structure \n\n- LIFO\n- Main Operations -\u003e Push, Pop , Peek\n- Push -\u003e add value on top\n- Pop -\u003e remove from top\n- peek -\u003e retrieve top element\n- isEmpty() -\u003e Check if the stack is isEmpty\n- size() -\u003e Returns the current size of Stack\n\n## Using LinkedList\n```\npackage DSA;\n\npublic class Stack_Using_LinkedList {\n\n    public static void main(String args[]) {\n        \n        myOtherStack stack = new myOtherStack();\n\n        stack.push(10);\n        stack.push(20);\n        stack.push(30);\n\n        stack.printStack();\n\n        System.out.println(\"Top element is \" + stack.peek());\n\n        System.out.println(stack.pop() + \" popped from stack\");\n\n        stack.printStack();\n        \n    }\n    \n}\n\nclass myOtherStack {\n     treeNode head;\n     int size; \n    \n    public myOtherStack() {\n        head = null;\n        size = 0;\n    }\n    \n    void push(int data) {\n    \t\n    \ttreeNode temp = new treeNode(data);\n    \t\n    \tif (head == null) {\n    \t\thead = temp;\n    \t\thead.next = null;\n    \t}\n    \telse {\n        temp.next = head;\n    \t}\n        size++;\n        head = temp;\n    }\n    \n    int peek() {\n        if (head == null) {\n            System.out.println(\"Empty\");\n            return -1;\n        }\n        else {\n            return head.data;\n        }\n    }\n    \n    int pop() {\n        if (head == null) {\n            System.out.println(\"Empty\");\n            return -1;\n        }\n        else {\n            int res = head.data;\n            head = head.next;\n            size--;\n            return res;\n        }\n    }\n    \n    boolean isEmpty() {\n        return head == null;\n    }\n    \n    int size() {\n        return size;\n    }\n    \n    void printStack() {\n        treeNode current = head;\n        System.out.print(\"Stack: \");\n        while (current != null) {\n            System.out.print(current.data + \" \");\n            current = current.next;\n        }\n        System.out.println();\n    }\n    \n    class treeNode {\n        int data;\n        treeNode next;\n        \n        public treeNode(int data) {\n            this.data = data;\n            this.next = null;\n        }\n    }\n}\n\n```\n\n## Using Array\n```\npackage DSA;\nimport java.util.*;\n\npublic class Stack_Using_Array {\n\n\tpublic static void main(String args[]) {\n//\t\tMain Operations--\u003e Push Pop Peek isEmpty() Size()\n\t\t\n\t\tmyStack stack = new myStack(10);\n\t\tstack.push(50);\n\t\tstack.push(20);\n\t\tstack.push(40);\n\t\tstack.push(10);\n\t\tSystem.out.println(Arrays.toString(stack.currentStack()));\n\t\tSystem.out.println(stack.peek());\n\t\tstack.pop();\n\t\tstack.pop();\n\t\tstack.pop();\n\t\tSystem.out.println(Arrays.toString(stack.currentStack()));\n\t\tSystem.out.println(stack.peek());\n\t\t\n\t}\n}\n\nclass myStack{\n\tint a[];\n\tint top;\n\tint capacity;\n\t\n\tpublic myStack(int capacity) {\n\t\tthis.capacity = capacity;\n\t\ttop = -1;\n\t\ta = new int[capacity];\n\t}\n\t\n\tvoid push(int data) {\n\t\tif(top==capacity-1) {\n\t\t\tthrow new StackOverflowError(\"Already Full \");\n\t\t}\n\t\ttop++;\n\t\ta[top] = data;\n\t}\n\t\n\tint pop() {\n\t\tif (top==-1) {\n//\t\t\tthrow new Exception();\n\t\t\tSystem.out.println(\"No element\");\n\t\t\treturn -1;\n\t\t\t}\n\t\telse {\n\t\tint res = a[top];\n\t\ttop--;\n\t\treturn res;\n\t\t}\n\t}\n\t\n\tint peek() {\n\t\tif (top==-1) {\n\t\t\tSystem.out.println(\"No element\");\n\t\t\treturn -1;\n\t\t}\n\t\telse {\n\t\t\treturn a[top];\n\t\t}\n\t}\n\t\n\tboolean isEmpty() {\n\t\treturn top ==-1;\n\t}\n\t\n\tint[] currentStack() {\n\t\treturn a;\n\t}\n//\t\n}\n\n```\n## Using Builtin class\n\n```\npackage DSA;\nimport java.util.Stack;\n\n\npublic class Stack_Using_Builtin_Class {\n\tpublic static void main(String args[]) {\n\t\tStack\u003cInteger\u003e s = new Stack\u003c\u003e();\n\t\ts.push(10);\n\t\ts.push(20);\n\t\ts.push(30);\n\t\ts.push(40);\n\t\ts.pop();\n//\t\twhile(!s.empty()) {\n//\t\t\tSystem.out.println(s.peek());\n//\t\t\ts.pop();\n//\t\t}\n\t\tSystem.out.println(s.size());\n\t}\n\t\n}\n```\n\n\n## String in java\n\n- Length : `a.length()`\n- (Slicing) getSubstring : `a.substring(i,i+1)`\n- Adding two Strings : `ans = ans.concat(String2)`\n\n\n```\nString s = \"This is good\";\nint l = a.length();\n\nfor (int i =0; i\u003ca.length(); i++){\n\nSystem.out.println(a.substring(i,i+1));\n\n}\n```\n- Reverse a String: \n```\nstatic public String reverseString(String a){\n        String ans = \"\";\n        int l = a.length();\n        \n        for (int i =0; i\u003ca.length(); i++){\n            ans = ans.concat(a.substring(l-i-1,l-i));\n        }\n        return ans;\n        }\n```\n\n## Array Implementation\n\n- Dynamic Array : `List\u003c\u003e list = new ArrayList\u003c\u003e();` \n- Add Element : `list.add(\"First\");`;\n- Remove by Index : `list.remove(0);`\n- Remove the last element : `list.removeLast();`\n```\nList\u003c\u003e list = new ArrayList\u003c\u003e();\n\nlist.add(\"First\");\nlist.add(\"Second\");\nlist.add(\"Third\");\nlist.add(\"Fourth\");\nlist.add(\"Fifth\");\n\n\nSystem.out.println(\"Size of Array:\"+list.size());\n\t\t\n\t\tfor (int i=0; i \u003c list.size(); i++) {\n\t\t\tSystem.out.println(list.get(i));\n\t\t}\n\nlist.set(3, \"THird\") ;\n\nlist.remove(0);\nlist.removeLast();\n\n\t\t\n```\n\n\n## Maths \n\n- Max Value : `Math.max(a,b)`\n- Min Value : `Math.min(a,b)`\n- Absolute(Positive) :`Math.abs(a,b)`\n- Before Decimal : `Math.floor(a,b)`\n- Ceil Value(Upper) : `Math.ceil(a,b)`\n\n## Linkedlist\n\n```\nimport java.util.*;\n\npublic class ReverseALinkedList {\n    public static void main(String[] args) {\n        ListNode a = new ListNode(1);\n        ListNode b = new ListNode(2);\n        ListNode c = new ListNode(1);\n        ListNode d = new ListNode(40);\n        ListNode e = new ListNode(50);\n        ListNode f = new ListNode(60);\n        ListNode g = new ListNode(70);\n        a.next = b;\n        b.next = c;\n        // c.next = d;\n        // d.next = e;\n        // e.next = f;\n        // f.next = g;\n\n        // printLinkedList(a);\n        // ListNode revHead = reverseLinkedList(a);\n        // printLinkedList(revHead);\n        System.out.println(isPalindrome(a));\n\n    }\n\n    static void printLinkedList(ListNode root){\n        if (root==null){\n            return;\n        }\n        while (root != null){\n            System.out.print(root.data + \" \");\n            root = root.next;\n        }\n        System.out.println();\n    }\n    \n\nclass ListNode{\n    int data;\n    ListNode next;\n\n    public ListNode(int data){\n        this.data = data;\n        this.next = null;\n    }\n}\n```\n\n- Check for Palindrome\n\n```\n static Boolean isPalindrome(ListNode root){\n        StringBuilder sb = new StringBuilder();\n        if (root==null){\n            return true;\n        }\n        while (root != null){\n            // System.out.print(root.data + \" \");\n            sb.append(root.data +\"\");\n            root = root.next;\n        }\n        System.out.println(sb.toString());\n        System.out.println(sb.reverse().toString());\n        return sb.toString().equals(sb.reverse().toString());\n    }\n    \n}\n```\n\n- Reverse The LinkedList\n```\nstatic ListNode reverseLinkedList(ListNode root){\n        if (root == null){\n            return null;\n        }\n        \n        ListNode prev = null;\n        ListNode curr = root;\n        \n        while(curr != null){\n            ListNode temp = curr.next;\n            curr.next = prev;\n            \n            prev = curr;\n            curr = temp;\n        }\n        return prev;\n        \n    }\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakshaypratapsingh09%2Fdev-revival","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fakshaypratapsingh09%2Fdev-revival","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fakshaypratapsingh09%2Fdev-revival/lists"}