Tuesday , 24 February , 2026 ! ☑ 1st problem of the day done ! ╰┈➤ (Codechef Starters 210, Div 4) • Problem No. D (First Element Counting) ! • Problem Link : ⤵︎ https://www.codechef.com/problems/FIRSTCNT?tab=statement Observation & Intuition : 🕵🏻♂️ • In this problem, we are given a array for each element we have to find out that how many x integers are there which is closest to this array elements and farthest from all of others elements of this array ! • If any of the integer value x closeat to more than one elements simultaneously then the lower elements will own this integer value beacuse we'll consider that it's the nearest from this lower array value than higher ! Solution Approach : 🎯 • At first, we'll sort the array in ascending order and then we'll calculate left mid and right mid ! • for each v[i] if(v[i] - Lmid >= Lmid - v[i - 1]) then map[v[i]] += v[i] - Lmid - 1, otherwise map[v[i]] += v[i] - Lmid; • And also for right side and even itself this value the x count will be map[v[i]] += Rmid - v[i] + 1; Time Complexity : O(nlogn) 📝 Implementation Uses : Adhoc </> 👨🏻💻 ! C++ Code Link : ╰┈જ⁀➴ https://github.com/Ridwanulhaquekawsar/Codechef-Problems/blob/main/D-First_Element_counting-codechef-starters-210-div-4.cpp #programming #problemSolving #coding #consistency #codechef #starters210 #analyticalThinking #observationSkills #maths #DeepThinking
More Relevant Posts
-
STDD is not just a manifesto. It's a working toolkit you can use today. I've spent the past months building out everything a team needs to adopt Specification & Test-Driven Development: 📄 Templates — Drop-in markdown templates for specifications, acceptance cases, NFR frameworks, and traceability matrices. Copy them into your repo and start writing. 🔧 Tools — Three Python utilities: • Traceability validator — ensures every spec ID has a test • Test generator — turns YAML acceptance cases into pytest or Go test skeletons • Specification fingerprint — detects when the knowledge layer changes ⚙️ CI Pipeline — A GitHub Actions workflow with three gates: traceability validation, test execution, and fingerprint verification. If any gate fails, the build fails. No spec drift allowed. ✅ Self-demonstrating — The repo applies STDD to its own tools. The specifications, tests, and CI all run against the tooling itself. 52 tests, 100% spec coverage, green badge. 📖 Documentation — Manifesto, method, writing guide, engineering playbook, adoption guide, anti-patterns, comparison with existing methods, and a complete end-to-end example (seat reservation system). Everything is open source under CC BY 4.0. Fork it, adapt it, use it. 🔗 https://lnkd.in/gj9jRzwS #SoftwareEngineering #STDD #OpenSource #DevTools #CI #Testing #QualityEngineering
To view or add a comment, sign in
-
24 Hours. One Problem. One Solution. You never truly know how productive you can be until inspiration hits at 3:00 AM. It started with a simple frustration during a uni assignment: I was tired of the total lack of standard code documentation for Shell scripts. I originally planned to tackle this after the term ended, but the idea became too intense to ignore. The result? A 24-hour non-stop sprint of engineering, AI collaboration, and pure "vibe coding." I’m excited to launch shDoc — a JSDoc-style documentation engine for Shell. 🐚💡 What it does: • Brings JSDoc intelligence to the bash environment. • Enables hover intelligence and symbol tracking for your functions. • Supports 84+ standard JSDoc tags (like @param) right in VS Code. • Features "sheDoc" script headers for global metadata. I built this because I believe in creating useful tools for all people. If you've ever looked at a 500-line .sh file and wondered what "$1" actually was, this is for you. After being hyper-productive, I am now officially hyper-inactive. Time to crash, but I’m already looking forward to the next moment like this. 🛌💤 Try it on VS Code: https://lnkd.in/gEBE2U6W Star the project on GitHub: https://lnkd.in/g9TTEgqc #BuildInPublic #DevOps #VSCode #ShellScripting #Programming #OpenSource
To view or add a comment, sign in
-
-
Tuesday , 24 February , 2026 ! ☑ 2nd problem of the day done ! ╰┈➤ (Codechef Starters 141, Div 4) • Problem No. C (Redundant Array) ! • Problem Link : ⤵︎ https://lnkd.in/gXgxxFy3 Observation & Intuition : 🕵🏻♂️ • In this problem we are given an array and we're asked to say what's minimum cost to make array elements equal . • Here, we're allowed to select a subarray portion of the array from L(left) bound to R(right) Bound and replace these portion elements by another random chosen integer Number ! • If we check for every occurence number by relacing all the elements of the array except this one ! We won't replace it where it already exists ! • Additionally we'll check whether by replacing all elements by 1, is it possible or not to get minimum operation cost that we need ! Solution Approach : 🎯 • At first, we'll find every elements frequency and then we'll try to find which occurence of elements will give the minimum operation cost if we replace remaining elements with it ! • Lastly we'll check occurence of 1 are present or not and then if we replace all the remaining elements by 1 then we'll check whether it's possible or not to get minimum operation Cost ! Time Complexity : O(nlogn) 📝 Implementation Uses : Ad-hoc, Map </> 👨🏻💻 ! C++ Code Link : ╰┈જ⁀➴ https://lnkd.in/g28xvAFw #problemSolving #programming #coding #consistency #analyticalThinking #codechefStarters141 #codechef #observationSkills
To view or add a comment, sign in
-
We applied our own methodology to its own tooling. It found a real bug. STDD (Specification & Test-Driven Development) ships with three Python tools: a traceability validator, a test generator, and a specification fingerprint hasher. These tools were originally written code-first — no formal specs, no structured tests. So we ate our own dogfood. We wrote STDD-style specifications for each tool. Derived acceptance cases. Generated test skeletons and filled them in. Built a traceability matrix. Wired it all into CI. And then the fingerprint tool failed its own CI gate. The bug: the hasher was including build artifacts (.pyc files, .DS_Store) in its hash. On macOS with Python cache files, you'd get one fingerprint. On a fresh Ubuntu CI runner, you'd get a different one. The hash was non-portable — it would never match across environments. Four iterations of debugging later, we added a knowledge-file filter that excludes build artifacts. The hash became deterministic across platforms. This bug had been invisible for weeks. The formal specification process — writing down rules, deriving edge cases, running them in CI — surfaced it in hours. 52 tests. 49 spec IDs. 100% traceability coverage. All three CI gates green. Sometimes the best proof that a methodology works is when it catches a bug in itself. 🔗 https://lnkd.in/gj9jRzwS #SoftwareEngineering #STDD #QualityEngineering #CI #Testing #OpenSource
To view or add a comment, sign in
-
Wednesday , 25 February , 2026 ! ☑ 3rd problem of the day done ! ╰┈➤ (Codechef Starters 227, Div 4) • Problem No. E (Equal Elements) ! • Problem Link : ⤵︎ https://lnkd.in/dFbViVJu Observation & Intuition : 🕵🏻♂️ • In this problem we're given an array and says to find out a longest subsequence which all of the adjacent pairs are equal they follow this condition like : Array2*i - 1 == Array2i ! • As here just adjacent is matters it's not binding in ny rule, other threads or sequential law it just need adjacent identical / Symmetrical pairs, And we'll to take this pairs as much as we can take to maximize the sub-sequence length ! Solution Approach : 🎯 • So, to do that at first we'll keep track the numbers by a map and then when we'll come across this value again then we'll reset out map and we'll count this as a valid pairs. Process will continue untill the loop end ! • And then we'll print twice of pairs that we've count like this way : • Out(2 * CountOfValidPairs) ! Time Complexity : O(nlogn) 📝 Implementation Uses : Adhoc, Map </> 👨🏻💻 ! C++ Code Link : ╰┈જ⁀➴ https://lnkd.in/d5gNBZun #programming #problemSolving #coding #consistency #codechef #codechefStarters227 #analyticalThinking #observationSkills #DSA #adhoc #equalElements #map #longestSubsequence #adjacentIdenticalPairs
To view or add a comment, sign in
-
#100DaysOfDevOps - Day Thirty - Eight Today I continued working on the CI setup for my LoggerBuddy project, and the focus was on something very important: lint testing. After getting Jenkins to successfully check out the code from GitHub, the next step was to start validating the backend code before moving further into the pipeline. What I worked on today: ✅ confirmed the checkout stage was working ✅ moved into the test stage of the CI flow ✅ focused on the Python backend of the app ✅ used Flake8 to perform lint testing ✅ worked inside a Python virtual environment ✅ installed dependencies from requirements.txt ✅ ran checks against the backend code ✅ investigated linting errors related to: blank lines line length whitespace formatting Before automating a task in Jenkins, it helps to first run and understand that task manually. That way, if automation fails later, you can tell whether the problem is in: the pipeline the environment or the application itself Today also reminded me that error messages are not there to scare you. Most times, they are actually pointing you toward the fix if you slow down enough to read them properly. Big takeaway: Good CI is not just about running builds. It is also about enforcing code quality early. Full Video Link: https://lnkd.in/dmCunHmt #DevOps #100DaysOfDevOps #Jenkins #Python #Flake8 #Linting #CICD #ContinuousIntegration #Automation #PlatformEngineering #CloudEngineering #LearningInPublic #TechdotSam
To view or add a comment, sign in
-
🔍 I Added One Tool to My CI/CD Pipeline — It Caught 7 Code Issues in 0.3 Seconds While building KubeHealer (an AI-powered self-healing Kubernetes platform), my GitLab pipeline kept passing but the codebase was silently accumulating problems. Unused imports. Dead code. Wasted memory. Then I added Ruff — a Python linter written in Rust that's 10-100x faster than Flake8 or Pylint. Here's what happened: 𝗕𝗲𝗳𝗼𝗿𝗲 𝗥𝘂𝗳𝗳: → `import asyncio` — never used → `import json` — never used → `from fastapi import HTTPException` — never used → `from datetime import timedelta` — never used → 7 dead imports across 3 files, shipping to production 𝗔𝗳𝘁𝗲𝗿 𝗥𝘂𝗳𝗳: → One command: `ruff check ml/ src/ --fix` → 7 unused imports removed in 0.3 seconds → Pipeline now blocks bad code automatically What Ruff catches that you might miss: 🗑️ Unused imports (wasted memory + confusion) ⚠️ Undefined variables (runtime crashes) 💀 Unreachable code (dead logic after return) 📏 Style violations (inconsistent formatting) My CI/CD setup is just 3 lines in .gitlab-ci.yml: ``` lint:python: script: - pip install ruff - ruff check ml/ src/ ``` Every push gets scanned. Every issue gets caught. Before it reaches production. The lesson? If you're writing Python without a linter in your CI/CD, you're shipping problems you could catch for free. Ruff is open source, zero-config, and replaces Flake8, isort, pyupgrade, and more — all in one tool. #Python #DevOps #CICD #Ruff #CodeQuality #GitLab #Linting #Automation #SoftwareEngineering #CleanCode #OpenSource #KubeHealer
To view or add a comment, sign in
-
-
IXP Environment Sync Checker – from “hope” to “know” We manage feature flags across 5 environments — Prod, Dev, Test, Perf, Stage — for 20+ service teams. The painful part? Knowing which flags are live in Production but missing or misaligned in lower environments. It was a manual, error‑prone checklist that nobody enjoyed… and everyone feared breaking. So I built the IXP Environment Sync Checker: a fully automated Python tool that runs every morning and tells each team exactly where they’re out of sync. What it does: Scans Production vs Dev/Test/Perf/Stage using the IXP API Covers 20+ teams in a single run Generates a daily HTML email report via Windows Task Scheduler Shows a summary table at the top with green/red status per team, sorted by out‑of‑sync count Breaks down flags team by team, flag by flag so owners know exactly what to fix We went from zero visibility to daily, automated sync awareness. No more guessing, no more manual cross‑checking dashboards. Small tool. Big reliability win. #Automation #Python #FeatureFlags #SRE #DevOps #Claude #InnerLoopEfficiency #EngineeringProductivity #GitHubCopilot
To view or add a comment, sign in
-
Wednesday , 25 February , 2026 ! ☑ 2nd problem of the day done ! ╰┈➤ (Codechef Starters 227, Div 4) • Problem No. D (Erase and Maximize) ! • Problem Link : ⤵︎ https://lnkd.in/d4ST7fkh Observation & Intuition : 🕵🏻♂️ • Here, we're given N dice and also A Sum integer Number which can be built by selecting a specific side face from N dice ! • If the the Sum exceed than (5 * N) then that means whithout talking any 6 we can't build the some so in which dice we're forced to take for building that sum then from this dice we can only take later 5 as a largest number to maximize our total score. Solution Approach : 🎯 • At first we'll check that whether the sum is less than or equal to the (5 * N) ! • If not, then we'll check in how many such dice are there don't have 6 that we can take.! Beacuse this 6 is already replaced by 0 after it talking for building targated sum ! • In all the places, where we couldn't take a six, we'll take 5 that means wherever we couldn't take a six, We'll take 5 Instead ! Time Complexity : O(1) 📝 Implementation Uses : Adhoc </> 👨🏻💻 ! C++ Code Link : ╰┈જ⁀➴ https://lnkd.in/d8Tm58Eu #programming #problemSolving #coding #consistency #codechef #codechefStarters227 #analyticalThinking #observationSkills #DSA #adhoc #eraseAndMaximize
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