Skip to content
Navigation Menu
Sign in
Appearance settings
Platform
AI CODE CREATION
GitHub Copilot
Write better code with AI
GitHub Copilot app
Direct agents from issue to merge
MCP Registry
Integrate external tools
DEVELOPER WORKFLOWS
Actions
Automate any workflow
Codespaces
Instant dev environments
Issues
Plan and track work
Code Review
Manage code changes
Code Quality
Enforce quality at merge
APPLICATION SECURITY
GitHub Advanced Security
Find and fix vulnerabilities
Code security
Secure your code as you build
Secret protection
Stop leaks before they start
EXPLORE
Why GitHub
Documentation
Blog
Changelog
Marketplace
View all features
Solutions
BY COMPANY SIZE
Enterprises
Small and medium teams
Startups
Nonprofits
BY USE CASE
App Modernization
DevSecOps
DevOps
CI/CD
View all use cases
BY INDUSTRY
Healthcare
Financial services
Manufacturing
Government
View all industries
View all solutions
Resources
EXPLORE BY TOPIC
AI
Software Development
DevOps
Security
View all topics
EXPLORE BY TYPE
Customer stories
Events & webinars
Ebooks & reports
Business insights
GitHub Skills
SUPPORT & SERVICES
Documentation
Customer support
Community forum
Trust center
Partners
View all resources
Open Source
COMMUNITY
GitHub Sponsors
Fund open source developers
PROGRAMS
Security Lab
Maintainer Community
GitHub Stars
Archive Program
REPOSITORIES
Topics
Trending
Collections
Enterprise
ENTERPRISE SOLUTIONS
Enterprise platform
AI-powered developer platform
AVAILABLE ADD-ONS
GitHub Advanced Security
Enterprise-grade security features
Copilot for Business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
Anshika15
/
Leet-Code
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
1
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
master
Branches
Tags
Go to file
Code
Open more actions menu
Latest commit
History
454 Commits
454 Commits
Folders and files
Name
Name
Last commit message
Last commit date
10. Regular Expression Matching.java
10. Regular Expression Matching.java
100. Same Tree.java
100. Same Tree.java
1003. Check If Word Is Valid After Substitutions.java
1003. Check If Word Is Valid After Substitutions.java
1004. Max Consecutive Ones III.java
1004. Max Consecutive Ones III.java
1007. Minimum Domino Rotations For Equal Row.java
1007. Minimum Domino Rotations For Equal Row.java
1008. Construct Binary Search Tree from Preorder Traversal.java
1008. Construct Binary Search Tree from Preorder Traversal.java
101. Symmetric Tree.java
101. Symmetric Tree.java
1011. Capacity To Ship Packages Within D Days.java
1011. Capacity To Ship Packages Within D Days.java
1019. Next Greater Node In Linked List.java
1019. Next Greater Node In Linked List.java
102. Binary Tree Level Order Traversal.java
102. Binary Tree Level Order Traversal.java
1020. Number of Enclaves.java
1020. Number of Enclaves.java
1022. Sum of Root To Leaf Binary Numbers.java
1022. Sum of Root To Leaf Binary Numbers.java
1029. Two City Scheduling.java
1029. Two City Scheduling.java
103. Binary Tree Zigzag Level Order Traversal.java
103. Binary Tree Zigzag Level Order Traversal.java
1032. Stream of Characters.java
1032. Stream of Characters.java
1034. Coloring A Border.java
1034. Coloring A Border.java
1038. Binary Search Tree to Greater Sum Tree.java
1038. Binary Search Tree to Greater Sum Tree.java
1046. Last Stone Weight.java
1046. Last Stone Weight.java
1047. Remove All Adjacent Duplicates In String.java
1047. Remove All Adjacent Duplicates In String.java
104MaximumDepthofBinaryTree.java
104MaximumDepthofBinaryTree.java
105. Construct Binary Tree from Preorder and Inorder Traversal.java
105. Construct Binary Tree from Preorder and Inorder Traversal.java
106. Construct Binary Tree from Inorder and Postorder Traversal.java
106. Construct Binary Tree from Inorder and Postorder Traversal.java
107. Binary Tree Level Order Traversal II.java
107. Binary Tree Level Order Traversal II.java
108. Convert Sorted Array to Binary Search Tree.java
108. Convert Sorted Array to Binary Search Tree.java
109. Convert Sorted List to Binary Search Tree.java
109. Convert Sorted List to Binary Search Tree.java
1091. Shortest Path in Binary Matrix.java
1091. Shortest Path in Binary Matrix.java
1094. Car Pooling.java
1094. Car Pooling.java
11. Container With Most Water.java
11. Container With Most Water.java
1104. Path In Zigzag Labelled Binary Tree.java
1104. Path In Zigzag Labelled Binary Tree.java
110BalancedBinaryTree.java
110BalancedBinaryTree.java
111. Minimum Depth of Binary Tree.java
111. Minimum Depth of Binary Tree.java
1110. Delete Nodes And Return Forest.java
1110. Delete Nodes And Return Forest.java
11171. Remove Zero Sum Consecutive Nodes from Linked List.java
11171. Remove Zero Sum Consecutive Nodes from Linked List.java
112. Path Sum.java
112. Path Sum.java
113. Path Sum II.java
113. Path Sum II.java
1137. N-th Tribonacci Number.java
1137. N-th Tribonacci Number.java
114. Flatten Binary Tree to Linked List.java
114. Flatten Binary Tree to Linked List.java
1143. Longest Common Subsequence.java
1143. Longest Common Subsequence.java
116. Populating Next Right Pointers in Each Node.java
116. Populating Next Right Pointers in Each Node.java
1161. Maximum Level Sum of a Binary Tree.java
1161. Maximum Level Sum of a Binary Tree.java
1162. As Far from Land as Possible.java
1162. As Far from Land as Possible.java
117. Populating Next Right Pointers in Each Node II.java
117. Populating Next Right Pointers in Each Node II.java
118. Pascal's Triangle.java
118. Pascal's Triangle.java
1189. Maximum Number of Balloons.java
1189. Maximum Number of Balloons.java
1192. Critical Connections in a Network.java
1192. Critical Connections in a Network.java
120. Triangle.java
120. Triangle.java
1200. Minimum Absolute Difference.java
1200. Minimum Absolute Difference.java
1202. Smallest String With Swaps.java
1202. Smallest String With Swaps.java
1209. Remove All Adjacent Duplicates in String II.java
1209. Remove All Adjacent Duplicates in String II.java
121. Best Time to Buy and Sell Stock.java
121. Best Time to Buy and Sell Stock.java
1217. Minimum Cost to Move Chips to The Same Position.java
1217. Minimum Cost to Move Chips to The Same Position.java
1219. Path with Maximum Gold.java
1219. Path with Maximum Gold.java
122. Best Time to Buy and Sell Stock II.java
122. Best Time to Buy and Sell Stock II.java
123. Best Time to Buy and Sell Stock III.java
123. Best Time to Buy and Sell Stock III.java
124. Binary Tree Maximum Path Sum.java
124. Binary Tree Maximum Path Sum.java
1249. Minimum Remove to Make Valid Parentheses.java
1249. Minimum Remove to Make Valid Parentheses.java
125. Valid Palindrome.java
125. Valid Palindrome.java
1260. Shift 2D Grid.java
1260. Shift 2D Grid.java
1261. Find Elements in a Contaminated Binary Tree.java
1261. Find Elements in a Contaminated Binary Tree.java
127. Word Ladder.java
127. Word Ladder.java
128. Longest Consecutive Sequence.java
128. Longest Consecutive Sequence.java
1283. Find the Smallest Divisor Given a Threshold.java
1283. Find the Smallest Divisor Given a Threshold.java
1288. Remove Covered Intervals.java
1288. Remove Covered Intervals.java
129. Sum Root to Leaf Numbers.java
129. Sum Root to Leaf Numbers.java
1290. Convert Binary Number in a Linked List to Integer.java
1290. Convert Binary Number in a Linked List to Integer.java
1291. Sequential Digits.java
1291. Sequential Digits.java
1299. Replace Elements with Greatest Element on Right Side.java
1299. Replace Elements with Greatest Element on Right Side.java
13. Roman to Integer.java
13. Roman to Integer.java
130. Surrounded Regions.java
130. Surrounded Regions.java
1302. Deepest Leaves Sum.java
1302. Deepest Leaves Sum.java
1305. All Elements in Two Binary Search Trees.java
1305. All Elements in Two Binary Search Trees.java
1306. Jump Game III.java
1306. Jump Game III.java
131. Palindrome Partitioning.java
131. Palindrome Partitioning.java
1310XORQueriesofaSubarray.java
1310XORQueriesofaSubarray.java
1315. Sum of Nodes with Even-Valued Grandparent.java
1315. Sum of Nodes with Even-Valued Grandparent.java
1319. Number of Operations to Make Network Connected.java
1319. Number of Operations to Make Network Connected.java
1325. Delete Leaves With a Given Value.java
1325. Delete Leaves With a Given Value.java
1328. Break a Palindrome.java
1328. Break a Palindrome.java
1329SorttheMatrixDiagonally.java
1329SorttheMatrixDiagonally.java
133. Clone Graph.java
133. Clone Graph.java
1332. Remove Palindromic Subsequences.java
1332. Remove Palindromic Subsequences.java
1337. The K Weakest Rows in a Matrix.java
1337. The K Weakest Rows in a Matrix.java
1338. Reduce Array Size to The Half.java
1338. Reduce Array Size to The Half.java
1342. Number of Steps to Reduce a Number to Zero.java
1342. Number of Steps to Reduce a Number to Zero.java
1347. Minimum Number of Steps to Make Two Strings Anagram.java
1347. Minimum Number of Steps to Make Two Strings Anagram.java
136SingleNumber.java
136SingleNumber.java
1372. Longest ZigZag Path in a Binary Tree.java
1372. Longest ZigZag Path in a Binary Tree.java
1379. Find a Corresponding Node of a Binary Tree in a Clone of That Tree.java
1379. Find a Corresponding Node of a Binary Tree in a Clone of That Tree.java
138. Copy List with Random Pointer.java
138. Copy List with Random Pointer.java
1396. Design Underground System.java
1396. Design Underground System.java
140. Word Break II.java
140. Word Break II.java
141LinkedListCycle.java
141LinkedListCycle.java
142. Linked List Cycle II.java
142. Linked List Cycle II.java
143. Reorder List.java
143. Reorder List.java
144. Binary Tree Preorder Traversal.java
144. Binary Tree Preorder Traversal.java
1446. Consecutive Characters.java
1446. Consecutive Characters.java
1448. Count Good Nodes in Binary Tree.java
1448. Count Good Nodes in Binary Tree.java
145. Binary Tree Postorder Traversal.java
145. Binary Tree Postorder Traversal.java
146. LRU Cache.java
146. LRU Cache.java
1461. Check If a String Contains All Binary Codes of Size K.java
1461. Check If a String Contains All Binary Codes of Size K.java
View all files
Repository files navigation
README
More
items
Leet-Code
leetcode problems solutions
About
This repository contains solutions to problems I solved on LeetCode
leetcode.com/bansalanshika/
Topics
algorithms
data-structures
datastructures
datastructures-algorithms
datastructuresinjava
dsa-algorithm
java
leetcode
leetcode-java
leetcode-questions
leetcode-solutions
problem-solving
Resources
Readme
Activity
Stars
1
star
Watchers
2
watching
Forks
0
forks
Report repository
Releases
Packages
Contributors
Languages
You can’t perform that action at this time.