🚀 Day 38/50 – #50DaysOfCode Today, I learned about ArrayList operations — concatenation, slicing, converting between arrays and ArrayLists, and the comparison between Array and ArrayList. Understanding these differences helps in choosing the right data structure effectively. ☕💻 #Day38 #JavaFullStack #Java #CCBP #NxtWave #LearningJourney #Consistency
Java ArrayList Operations and Choosing Data Structures
More Relevant Posts
-
🚀 Day 35/50 – #50DaysOfCode Today, I learned about array concatenation, array slicing, and multidimensional arrays in Java, along with how to iterate over multidimensional arrays. These concepts help in handling complex data structures more efficiently. ☕💻 #Day35 #JavaFullStack #Java #CCBP #NxtWave #LearningJourney #Consistency
To view or add a comment, sign in
-
🚀 Day 40 of #100DaysOfDSA (Java) Today was focused on practicing Graph concepts. I attended a live session with my mentor where I: 🔹 Solved graph-based problems using BFS & DFS 🔹 Practiced traversal and path-related questions 🔹 Improved my understanding of graph problem-solving strategies Key takeaway: Graphs require strong conceptual clarity, and solving problems with guidance helps in building the right approach. Practicing BFS and DFS is helping me understand how to explore nodes efficiently and solve connectivity problems. Day 40 ✅ Focused on practice, consistency, and improving problem-solving skills. #DSA #Java #Graphs #BFS #DFS #ProblemSolving #100DaysOfCode #DeveloperJourney #LearningInPublic #Consistency
To view or add a comment, sign in
-
-
🚀Day 40 LeetCode 1161 – Maximum Level Sum of a Binary Tree Ever wondered how to find the level of a binary tree with the maximum sum of node values? 🤔 Here’s the idea: We traverse the tree level by level (BFS) and compute the sum at each level. The trick is to keep track of the maximum sum and return the smallest level where this occurs. 💡 Key Insight: Level-order traversal (using a queue) naturally processes nodes one level at a time, making it perfect for this problem. 🔧 Approach: ✔ Use a queue for BFS ✔ For each level: • Calculate sum of nodes ✔ Track maximum sum and corresponding level 🔥 Takeaway: Whenever a problem involves levels in a tree, think BFS first — it often leads to the cleanest solution. #LeetCode #DataStructures #Java #CodingInterview #BinaryTree #BFS #ProblemSolving
To view or add a comment, sign in
-
-
Day 84 - Binary Tree Right Side View Computed the visible nodes when viewing a binary tree from the right side. Approach: • Use level order traversal (BFS) • Process nodes level by level • Add the last node of each level to the result Key Idea: The rightmost node at each level is the visible one Time Complexity: O(n) Space Complexity: O(n) #Day84 #LeetCode #BinaryTree #BFS #DSA #Java #CodingJourney
To view or add a comment, sign in
-
-
🎉🎉 Day-40 of #60DaysOfDSA 🎉🎉 Problem: Rotate a Linked List 👉 Problem Statement: Given the head of a linked list, left rotate it k times and return the modified list. 👉 Approach Used (Circular Linked List Trick): ✔️ Find length of linked list ✔️ Connect tail → head (make it circular) ✔️ Reduce k using: k = k % length ✔️ Find new tail (k-1 steps ahead) ✔️ Break the link to get new head 👉 Time Complexity: O(n) #geekstreak60 #dsa #java #problemsolving
To view or add a comment, sign in
-
-
Day 78 - Binary Tree Level Order Traversal Implemented level-by-level traversal of a binary tree using a queue (BFS). Approach: • Use a queue to process nodes • Traverse level by level • Track size of each level • Store values accordingly Time Complexity: O(n) Space Complexity: O(n) #Day78 #LeetCode #BinaryTree #DSA #Java #CodingJourney #ProblemSolving
To view or add a comment, sign in
-
-
🚨 Exposing JPA entities directly is risky I used to return entities in API responses. Big mistake. 💥 Problems: - Sensitive fields exposed - Tight coupling with DB schema - Hard to evolve APIs ✅ Fix: Introduced DTO layer Mapped only required fields 💡 Takeaway: Entities are for DB. DTOs are for APIs. Keep them separate. #Java #SpringBoot #BackendDevelopment #SoftwareEngineering #Microservices #JPA #RESTAPI #DeveloperLife #CareerGrowth
To view or add a comment, sign in
-
🎉🎉 Day-38 of #60DaysOfDSA 🎉🎉 Problem: Row with Maximum 1s 👉 Problem Statement: Given a 2D binary matrix (rows sorted), find the index of the row having the maximum number of 1s. 👉 Approach Used: ✔️ Traverse each row ✔️ Find first occurrence of 1 ✔️ Count number of 1s → (m - j) ✔️ Track row with maximum count 👉Time Complexity: O(n * m) #geekstreak60 #dsa #java #problemsolving
To view or add a comment, sign in
-
-
🚀 Day 60 of #100DaysOfCode Solved 100. Same Tree on LeetCode 🔗 🧠 Key Insight: Two trees are the same if: 👉 Their structure is identical 👉 Corresponding nodes have equal values ⚙️ Approach (Recursive DFS): 1️⃣ If both nodes are null → ✅ return true 2️⃣ If one is null and other is not → ❌ return false 3️⃣ If values are different → ❌ return false 4️⃣ Recursively check: 🔹 Left subtree → isSame(p.left, q.left) 🔹 Right subtree → isSame(p.right, q.right) 5️⃣ Return: 👉 leftCheck && rightCheck ⏱️ Time Complexity: O(n) 📦 Space Complexity: O(h) (recursive stack) #100DaysOfCode #LeetCode #DSA #BinaryTree #Recursion #DFS #Java #InterviewPrep #CodingJourney
To view or add a comment, sign in
-
-
Day 44🚀 Solved Number of Islands — a classic DFS/BFS problem that really tests grid traversal and thinking in connected components. 💡 Key Takeaways: Learned how to treat the grid like a graph Used DFS to explore and mark visited land Strengthened understanding of recursion + boundary handling ⚡ Result: ✅ All test cases passed ⏱️ Optimized runtime 📈 Improving problem-solving speed day by day Consistency > Motivation. Showing up daily is the real win. #Day44 #LeetCode #DSA #Java #CodingJourney #Consistency #ProblemSolving
To view or add a comment, sign in
-
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development