-
Notifications
You must be signed in to change notification settings - Fork 66
Fix Google indexing: trim sitemap, noindex thin pages, regenerate blogs #31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,26 +8,16 @@ const SITE_URL = "https://codejeet.com"; | |
| /** Fixed build date — avoids misleading per-page "now" timestamps. */ | ||
| const BUILD_DATE = new Date("2025-06-01"); | ||
|
|
||
| type SitemapGroup = "static" | "company" | "problem" | "topic" | "blog" | "other"; | ||
| type SitemapGroup = "static" | "company" | "problem" | "topic"; | ||
|
|
||
| function classifyUrl(urlPath: string): SitemapGroup { | ||
| if (urlPath.startsWith("/company/")) return "company"; | ||
| if (urlPath.startsWith("/problem/")) return "problem"; | ||
| if (urlPath.startsWith("/topic/")) return "topic"; | ||
| if (urlPath.startsWith("/blog")) return "blog"; | ||
| if ( | ||
| urlPath === "/" || | ||
| urlPath === "/dashboard" || | ||
| urlPath === "/companies" || | ||
| urlPath === "/podcast" || | ||
| urlPath.startsWith("/difficulty/") || | ||
| urlPath.startsWith("/system-design") | ||
| ) | ||
| return "static"; | ||
| return "other"; | ||
| return "static"; | ||
| } | ||
|
Comment on lines
13
to
18
|
||
|
|
||
| const GROUP_IDS: SitemapGroup[] = ["static", "company", "problem", "topic", "blog", "other"]; | ||
| const GROUP_IDS: SitemapGroup[] = ["static", "company", "problem", "topic"]; | ||
|
|
||
| export async function generateSitemaps() { | ||
| return GROUP_IDS.map((id) => ({ id })); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,85 +1,198 @@ | ||
| --- | ||
| title: "Array Questions at Accenture: What to Expect" | ||
| description: "Prepare for Array interview questions at Accenture — patterns, difficulty breakdown, and study tips." | ||
| date: "2028-01-15" | ||
| date: "2028-01-07" | ||
| category: "dsa-patterns" | ||
| tags: ["accenture", "array", "interview prep"] | ||
| --- | ||
|
|
||
| Array questions make up over half of Accenture's technical interview problem set, with 73 out of 144 total questions. This heavy emphasis isn't arbitrary. Arrays are the foundational data structure for representing sequential data, a common pattern in real-world business data processing, ETL pipelines, and system operations that Accenture consultants and developers regularly handle. Mastering array manipulation demonstrates core competency in logical thinking, efficient data handling, and clean code—skills directly applicable to the client projects you'd work on. If you can't navigate array problems confidently, you're at a significant disadvantage. | ||
| If you're preparing for a software engineering or data role at Accenture, you'll quickly notice a dominant theme in their technical question bank: **Arrays**. With 73 out of 144 total questions dedicated to this single data structure, it's not just a topic—it's _the_ topic. This isn't an accident. Accenture's projects often involve data transformation, ETL pipelines, financial calculations, and system integrations, all of which boil down to manipulating ordered sequences of data. In a real interview, you are far more likely to get a problem that asks you to process, merge, filter, or analyze an array than one that requires implementing a complex red-black tree. Mastering arrays isn't just part of your prep; it's the foundation. | ||
|
|
||
| ## What to Expect — Types of Problems | ||
| ## Specific Patterns Accenture Favors | ||
|
|
||
| Accenture's array questions tend to focus on practical application over obscure algorithmic tricks. You can expect problems in these key categories: | ||
| Accenture's array problems tend to skew towards practical, business-logic-oriented manipulation rather than abstract computer science puzzles. You'll see a heavy emphasis on: | ||
|
|
||
| 1. **Basic Traversal and Manipulation:** Tasks like searching, inserting, deleting, reversing, or rotating elements. These test your fundamental loop control and index management. | ||
| 2. **Sorting and Searching:** Implementing or leveraging sorts (like quicksort or mergesort) and search algorithms (binary search on sorted arrays). Questions often involve finding specific elements, pairs, or ranges. | ||
| 3. **Subarray and Prefix Sum Problems:** Finding contiguous subarrays that meet a condition (e.g., maximum sum, target sum). These are common and test your ability to optimize from a brute-force O(n²) approach to an O(n) solution using techniques like the sliding window or prefix sums. | ||
| 4. **Two-Pointer Techniques:** Used for problems involving sorted arrays, such as removing duplicates, finding pairs with a target sum, or merging two sorted arrays. This pattern is highly efficient and frequently tested. | ||
| 5. **In-Place Operations:** Modifying the array without using significant extra space, such as moving zeroes to the end or segregating even/odd numbers. This demonstrates memory-aware programming. | ||
| 1. **In-place Array Modification:** Problems where you must rearrange elements within the same array, often using the Two Pointer technique. This tests your ability to optimize for space, a common constraint in large-scale data processing. | ||
| - **Example:** Moving zeroes to the end (`Move Zeroes #283`), removing duplicates from a sorted array (`Remove Duplicates from Sorted Array #26`). | ||
|
|
||
| ## How to Prepare — Study Tips with One Code Example | ||
| 2. **Subarray Analysis:** Calculating sums, averages, or finding subarrays that meet certain criteria (e.g., maximum sum, target sum). This pattern directly mirrors analyzing time-series data or financial segments. | ||
| - **Example:** Finding the contiguous subarray with the largest sum (`Maximum Subarray #53`), often solved with Kadane's Algorithm. | ||
|
|
||
| Focus on pattern recognition, not memorization. Understand the underlying technique for each problem type. Practice writing clean, readable code with clear variable names—communication is key. Always discuss time and space complexity. For each problem, start with the brute-force solution, then optimize. | ||
| 3. **Sorting & Searching Hybrids:** Problems that appear to be about searching but have an optimal solution that involves sorting first, or that require custom sorting logic. | ||
| - **Example:** Meeting room scheduling problems, which are essentially interval problems (`Meeting Rooms #252`, `Merge Intervals #56`). | ||
|
|
||
| A critical pattern is the **Two-Pointer Technique** for finding a pair in a sorted array that sums to a target. Instead of a nested loop (O(n²)), you use a pointer at the start and end, moving them inward based on the sum comparison (O(n)). | ||
| 4. **Basic Hashing for Lookup:** While not exclusively array-based, using a hash map (dictionary) to complement array traversal for efficient lookups is a cornerstone. The classic `Two Sum #1` is a perfect example of this pattern. | ||
|
|
||
| Here is a canonical example of the in-place modification pattern using two pointers: | ||
|
|
||
| <div class="code-group"> | ||
|
|
||
| ```python | ||
| # LeetCode #283: Move Zeroes | ||
| # Time: O(n) | Space: O(1) | ||
| def moveZeroes(nums): | ||
| """ | ||
| Moves all 0's to the end while maintaining the relative order | ||
| of the non-zero elements. Operates in-place. | ||
| """ | ||
| # `last_non_zero` points to the position where the next | ||
| # non-zero element should be placed. | ||
| last_non_zero = 0 | ||
|
|
||
| # First pass: move all non-zero elements forward. | ||
| for i in range(len(nums)): | ||
| if nums[i] != 0: | ||
| nums[last_non_zero] = nums[i] | ||
| last_non_zero += 1 | ||
|
|
||
| # Second pass: fill the remaining positions with zeroes. | ||
| for i in range(last_non_zero, len(nums)): | ||
| nums[i] = 0 | ||
|
|
||
| # Example: nums = [0,1,0,3,12] becomes [1,3,12,0,0] | ||
| ``` | ||
|
|
||
| ```javascript | ||
| // LeetCode #283: Move Zeroes | ||
| // Time: O(n) | Space: O(1) | ||
| function moveZeroes(nums) { | ||
| let lastNonZero = 0; | ||
|
|
||
| // Move non-zero elements to the front. | ||
| for (let i = 0; i < nums.length; i++) { | ||
| if (nums[i] !== 0) { | ||
| nums[lastNonZero] = nums[i]; | ||
| lastNonZero++; | ||
| } | ||
| } | ||
|
|
||
| // Fill the rest with zeroes. | ||
| for (let i = lastNonZero; i < nums.length; i++) { | ||
| nums[i] = 0; | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| ```java | ||
| // LeetCode #283: Move Zeroes | ||
| // Time: O(n) | Space: O(1) | ||
| public void moveZeroes(int[] nums) { | ||
| int lastNonZero = 0; | ||
|
|
||
| // Shift non-zero elements forward. | ||
| for (int i = 0; i < nums.length; i++) { | ||
| if (nums[i] != 0) { | ||
| nums[lastNonZero] = nums[i]; | ||
| lastNonZero++; | ||
| } | ||
| } | ||
|
|
||
| // Zero out the remaining elements. | ||
| for (int i = lastNonZero; i < nums.length; i++) { | ||
| nums[i] = 0; | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| </div> | ||
|
|
||
| ## How to Prepare | ||
|
|
||
| Your study should be pattern-driven, not problem-driven. Don't just solve 73 array problems; identify the 8-10 core techniques that solve 90% of them. For each pattern, understand the _why_ behind the algorithm. Why do we use a left and right pointer for a sorted array? Why does Kadane's Algorithm work for maximum subarray? | ||
|
|
||
| Practice verbalizing your thought process. Accenture interviewers often assess how you break down a problem. Start by stating the brute force approach, then identify bottlenecks (e.g., "The naive nested loop would be O(n²), which is inefficient for large datasets. We can optimize by using a hash map to store seen values, reducing the lookup time to O(1)."). | ||
|
|
||
| Let's look at another essential pattern: using a hash map for complement lookup, as seen in `Two Sum`. | ||
|
|
||
| <div class="code-group"> | ||
|
|
||
| ```python | ||
| def two_sum_sorted(nums, target): | ||
| left, right = 0, len(nums) - 1 | ||
| while left < right: | ||
| current_sum = nums[left] + nums[right] | ||
| if current_sum == target: | ||
| return [left, right] | ||
| elif current_sum < target: | ||
| left += 1 | ||
| else: | ||
| right -= 1 | ||
| return [-1, -1] # No pair found | ||
| # LeetCode #1: Two Sum | ||
| # Time: O(n) | Space: O(n) | ||
| def twoSum(nums, target): | ||
| """ | ||
| Returns indices of the two numbers that add up to target. | ||
| Assumes exactly one solution exists. | ||
| """ | ||
| seen = {} # Map value -> index | ||
|
|
||
| for i, num in enumerate(nums): | ||
| complement = target - num | ||
| if complement in seen: | ||
| return [seen[complement], i] | ||
| seen[num] = i | ||
| return [] # Never reached per problem guarantee | ||
| ``` | ||
|
|
||
| ```javascript | ||
| function twoSumSorted(nums, target) { | ||
| let left = 0; | ||
| let right = nums.length - 1; | ||
| while (left < right) { | ||
| const currentSum = nums[left] + nums[right]; | ||
| if (currentSum === target) { | ||
| return [left, right]; | ||
| } else if (currentSum < target) { | ||
| left++; | ||
| } else { | ||
| right--; | ||
| // LeetCode #1: Two Sum | ||
| // Time: O(n) | Space: O(n) | ||
| function twoSum(nums, target) { | ||
| const seen = new Map(); | ||
|
|
||
| for (let i = 0; i < nums.length; i++) { | ||
| const complement = target - nums[i]; | ||
| if (seen.has(complement)) { | ||
| return [seen.get(complement), i]; | ||
| } | ||
| seen.set(nums[i], i); | ||
| } | ||
| return [-1, -1]; // No pair found | ||
| return []; | ||
| } | ||
| ``` | ||
|
|
||
| ```java | ||
| public int[] twoSumSorted(int[] nums, int target) { | ||
| int left = 0; | ||
| int right = nums.length - 1; | ||
| while (left < right) { | ||
| int currentSum = nums[left] + nums[right]; | ||
| if (currentSum == target) { | ||
| return new int[]{left, right}; | ||
| } else if (currentSum < target) { | ||
| left++; | ||
| } else { | ||
| right--; | ||
| // LeetCode #1: Two Sum | ||
| // Time: O(n) | Space: O(n) | ||
| public int[] twoSum(int[] nums, int target) { | ||
| Map<Integer, Integer> seen = new HashMap<>(); | ||
|
|
||
| for (int i = 0; i < nums.length; i++) { | ||
| int complement = target - nums[i]; | ||
| if (seen.containsKey(complement)) { | ||
| return new int[] {seen.get(complement), i}; | ||
| } | ||
| seen.put(nums[i], i); | ||
| } | ||
| return new int[]{-1, -1}; // No pair found | ||
| return new int[] {}; // Should not be reached | ||
| } | ||
| ``` | ||
|
|
||
| </div> | ||
|
|
||
| ## How Accenture Tests Array vs Other Companies | ||
|
|
||
| Compared to FAANG companies, Accenture's array problems are generally less focused on extreme algorithmic cleverness and more on **correct, clean, and maintainable implementation**. At a company like Google, you might get a variant of `Two Sum` that requires a custom data structure or has multiple constraints. At Accenture, you're more likely to get the standard `Two Sum` but be evaluated on your code clarity, error handling, and ability to explain the trade-offs between a hash map and a two-pointer approach (if the array were sorted). | ||
|
|
||
| The difficulty often lies in the problem's _domain wrapping_. You might be asked to find the maximum profit from a series of daily prices (`Best Time to Buy and Sell Stock #121`), which is fundamentally a maximum subarray-type problem. The key is to strip away the business context to reveal the underlying array pattern. | ||
|
|
||
| ## Study Order | ||
|
|
||
| Tackle array topics in this logical progression to build a compounding understanding: | ||
|
|
||
| 1. **Basic Traversal & Pointers:** Learn to iterate and manipulate indices. Master the fast & slow pointer and left & right pointer patterns. This is the grammar of array manipulation. | ||
| 2. **Hashing for Lookup:** Learn to use a hash map to achieve O(1) lookups, transforming O(n²) brute-force solutions into O(n) solutions. This is your first major optimization tool. | ||
| 3. **Prefix Sums & Sliding Window:** These are your tools for analyzing subarrays. Prefix sums help with range sum queries, while the sliding window is optimal for problems asking for "the longest/subarray with sum ≤ K". | ||
| 4. **In-place Operations:** Practice modifying arrays without extra space. This solidifies your pointer skills and is critical for space-optimized code. | ||
| 5. **Sorting & Searching:** Learn how sorting an array can unlock simpler solutions (like two-pointer for `Two Sum II`). Understand binary search for O(log n) lookups in sorted arrays. | ||
| 6. **Intervals:** Treat intervals as a special array-of-arrays. Mastering merging, inserting, and finding overlaps is a very high-yield sub-topic. | ||
| 7. **Introduction to Kadane's Algorithm:** Learn this specific, elegant solution for the maximum subarray problem. It's a classic that appears frequently. | ||
|
|
||
| ## Recommended Practice Order | ||
|
|
||
| Build your skills progressively. Start with basic traversal and in-place operations to solidify fundamentals. Move on to sorting and searching algorithms next. Then, tackle two-pointer problems, as they are a cornerstone for efficiency. After that, focus on the more complex subarray and prefix sum problems. Finally, mix all categories in timed mock interviews to simulate the actual test environment. | ||
| Solve these problems in sequence. Each introduces a core concept needed for the next. | ||
|
|
||
| 1. **Two Sum (#1):** Hashing fundamentals. | ||
| 2. **Best Time to Buy and Sell Stock (#121):** Simple single-pass logic (a variant of max subarray). | ||
| 3. **Move Zeroes (#283):** Basic in-place two-pointer. | ||
| 4. **Remove Duplicates from Sorted Array (#26):** Another in-place two-pointer. | ||
| 5. **Maximum Subarray (#53):** Learn Kadane's Algorithm. | ||
| 6. **Merge Intervals (#56):** Master sorting and comparing array boundaries. | ||
| 7. **Two Sum II - Input Array Is Sorted (#167):** Apply two-pointer technique to a hashing problem. | ||
| 8. **Container With Most Water (#11):** Advanced two-pointer application. | ||
| 9. **3Sum (#15):** Combine sorting, two-pointer, and deduplication—a comprehensive test. | ||
| 10. **Product of Array Except Self (#238):** A clever prefix/postfix problem that tests your ability to think in passes. | ||
|
|
||
| By following this path, you'll build the mental toolkit to decompose any Accenture array problem into recognizable components. Remember, the goal isn't to memorize solutions, but to recognize that a new problem about "optimizing resource batches" is just `Merge Intervals` in a different shirt. | ||
|
|
||
| [Practice Array at Accenture](/company/accenture/array) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Blocking
/_next/static/can prevent Google from fetching JS/CSS resources needed to render pages, which may hurt indexing and rendered-content evaluation. Common practice is to allow/_next/static/(and only disallow truly non-public endpoints), while optionally disallowing/_next/data/if you have a specific reason.