Day 16-What I Learned In a Day(JAVA) 🔹 Assignment Operators Used to assign and update values in variables. Symbols: =, += ,-=, *=, /= ,%= . 🔹 Relational Operators Used to compare two values and return true or false. Symbols: > ,<, >=, <=, == ,!= . 🔹 Conditional (Ternary) Operator Short form of if-else used for simple decision making. Symbol: condition ? value1 : value2; 🔹 Type Casting Used to convert one datatype into another (Widening & Narrowing). Symbol: (datatype) Practiced 👇 #Java #JavaLearning #ProgrammingBasics #CodingJourney #SoftwareDevelopment #LearnToCode
More Relevant Posts
-
Day 26 - What I Learned In a Day(JAVA) he switch statement is used to select one block of code from multiple options based on the value of an expression. Workflow of Switch Statement 1️⃣ Expression is evaluated The value inside switch(expression) is calculated. 2️⃣ Value is compared with cases The result is compared with each case value. 3️⃣ Matching case executes If a matching case is found, that block of code runs. 4️⃣ break stops the switch break exits the switch statement after executing the matched case. 5️⃣ default runs if no match If none of the cases match, the default block executes. Syntax: switch(expression) { case value1: // statements break; case value2: // statements break; case value3: // statements break; default: // statements } #Java #Programming #JavaSwitch #DecisionMaking #Coding #CaseStatement #BreakStatement #DefaultCase
To view or add a comment, sign in
-
-
Day 37 — Merge Intervals ✅ Solved the classic Merge Intervals problem on LeetCode. Key idea: - Sort intervals by start time - Traverse and merge overlapping intervals - Keep updating the end boundary Time Complexity: O(n log n) Space Complexity: O(n) This problem looks simple, but tests your ability to think clearly about overlapping ranges — something that shows up a lot in real-world scenarios. Consistency > motivation. Showing up daily. #leetcode #dsa #problemSolving #codingJourney #java #100DaysOfCode
To view or add a comment, sign in
-
-
Day 35 – Plus One Worked on a problem where a large integer is represented as an array of digits, and the task was to increment the number by one. Key Learnings: Traversing arrays from right to left to simulate digit addition Handling carry when a digit becomes 10 Managing edge cases where all digits are 9 by creating a new array #DSA #Java #Arrays #ProblemSolving #CodingPractice #LeetCode
To view or add a comment, sign in
-
-
𝗬𝗼𝘂 𝗵𝗮𝘃𝗲 𝗯𝗲𝗲𝗻 𝘂𝘀𝗶𝗻𝗴 𝗕𝗶𝗻𝗮𝗿𝘆 𝗦𝗲𝗮𝗿𝗰𝗵 𝘄𝗿𝗼𝗻𝗴. It is not just for sorted arrays. The real definition — "Eliminate HALF the search space with each decision." That one shift in thinking unlocks 20+ LeetCode problems. Swipe to see the template, live code, and 7 problems you can now solve with one pattern. 👇 Save this. 🔖 #DSA #BinarySearch #Java #LeetCode #CodingInterview #DebugWithPurpose
To view or add a comment, sign in
-
Day 9/100 – LeetCode Challenge Problem: 3Sum Today’s challenge was to find all unique triplets in an array whose sum equals 0. Approach: Sort the array to efficiently apply the two-pointer technique. Fix one element nums[i] and use two pointers (left and right) to find the remaining two numbers. If the sum equals 0, store the triplet. Skip duplicate elements to ensure only unique triplets are included. Key Idea: Sorting + Two Pointers helps reduce the brute-force O(n³) approach to O(n²). Concepts Practiced: Sorting Two-pointer technique Duplicate handling Array traversal optimization #100DaysOfCode #LeetCode #DSA #Java #TwoPointers #ProblemSolving #CodingJourney
To view or add a comment, sign in
-
-
Day 46 – Length of Last Word Worked on a problem to find the length of the last word in a string while handling extra spaces efficiently. Key Learnings: Traversing a string from right to left to avoid unnecessary operations Skipping trailing spaces before processing the actual word Using a single pass approach for optimal performance #DSA #Java #Strings #ProblemSolving #CodingPractice
To view or add a comment, sign in
-
-
Day 47 – Remove Duplicate Letters Worked on a problem to remove duplicate letters from a string such that every character appears once and the result is the smallest in lexicographical order. Key Learnings: Using a Stack to build the result while maintaining order Applying a greedy approach to remove larger characters when a smaller one appears Tracking character frequency and visited states to ensure correctness #DSA #Java #Stacks #GreedyAlgorithm #ProblemSolving #CodingPractice
To view or add a comment, sign in
-
-
LeetCode Problem || Check if Binary String Has at Most One Segment of Ones(1784)🚀 we need to check: The string should have only one continuous block of '1's. After a '0' appears, '1' should never appear again. ✨ Insight: Instead of manually counting segments using loops, we can simply check if "01" exists in the string. 📌 Time Complexity: O(n) Practicing problems like these helps improve pattern recognition and problem-solving efficiency. #LeetCode #DSA #Java #CodingPractice #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