Please generate a unique JSON object suitable for automating the programming task testing platform, strictly in the following format:
{
"Title": "Task Name",
"Task Description": "Description of the task.",
"Function Signature": "def function_name(parameters) -> return_type:",
"Solve": "",
"Input": "Description of the input parameters.",
"Output": "Description of the expected output.",
"Examples": [
{
"input": "Example input here",
"output": "Expected output here"
},
{
"input": "Another example input here",
"output": "Another expected output here"
}
]
}
Ensure that:
1. The task includes complex sorting algorithms.
2. The JSON follows this exact structure and does not include any additional text or variations.
3. The task should be complex and unique, avoiding direct copying from common platforms like LeetCode or similar sources.
4. The solution must not use any imports in the code (i.e., no import statements).
5. The 'Solve' section must remain empty.
6. Ensure that the outputs are different each time by varying the problem constraints, examples, and overall structure of the task, so no two consecutive outputs are the same.
7. Include a unique aspect in each generated task, such as a specific mathematical concept, algorithm, or programming principle that distinguishes it from previously generated tasks.
8. The 'Function Signature' should strictly follow the format: 'def function_name(parameters) -> return_type:', but the 'Solve' section must remain empty. Ensure that the input description corresponds to the expected parameters in the signature.
Ensure that the solution must not be any of the following titles:
Reverse and Count Vowels
Custom Merge Sort with Inversion Count
Find Shortest Path in Weighted Graph
Count Unique Paths in a Grid
Longest Increasing Subsequence with Constraints
Determine DNA Base Pairing
String Transformation and Analysis
Fraction Simplification
Matrix Spiral Traversal
Custom Radix Sort for Positive Integers
String Compression with Patterns
Maximal Subarray Sum with Constraints
Character Frequency Analysis
String Palindrome and Anagram Checker
Nested List Sum with Depth Weighting
Nested List Product with Depth Weighting
Character Frequency Rearrangement
Optimized Binary Search with Nested Structures
Custom Bucket Sort with Range Constraints
Graph Colorability Checker
Optimized Dynamic Programming with Duplicates
Nested Dictionary Value Aggregation
Custom Quick Sort with Median of Medians
Nested List Depth Average
Advanced K-way Merge Sort
Optimal Coin Change with Limited Supply
Assistant
json
{
"Title": "Advanced Sorting with Unique Element Constraints",
"Task Description": "Implement a custom sorting algorithm that sorts a list of integers. The algorithm needs to perform sorting such that all unique elements appear first, followed by the duplicate elements. The unique elements must be sorted in ascending order, while the duplicates must be sorted in descending order. This sorting must be done in a single traversal of the array.",
"Function Signature": "def custom_sort(arr: List[int]) -> List[int]:",
"Solve": "",
"Input": "An unsorted list of integers with arbitrary distribution, where integers can be unique or may repeat.",
"Output": "A sorted list of integers where unique numbers are sorted in ascending order first, followed by duplicates in descending order.",
"Examples": [
{
"input": "[4, 5, 6, 5, 3, 8, 3, 9, 1]",
"output": "[1, 4, 6, 8, 9, 5, 5, 3, 3]"
},
{
"input": "[7, 3, 3, 2, 4, 7, 5, 5, 6]",
"output": "[2, 4, 6, 7, 7, 5, 5, 3, 3]"
}
]
}
Optimized Merge Sort with Arbitrary Sort Criteria
Hierarchical Employee Salary Calculation
Custom Heap Sort with Priority Levels
String Pattern Replacer
String Rotation and Count Unique Characters
Custom Heap Sort with Dynamic Priority Adjustment
Pattern Removal from String
Maximum Product Subarray with Constraints
Minimize Cost of Coin Change with Constraints
String Interleaving with Constraints
Frequency-Preserving Rearrangement
Nested Fibonacci Sequence Sum
Unique Graph Path
Mixed Case Word Transposition
Graph Connectivity and Cycle Detection
String Reversal and Character Mapping
Longest Palindromic Subsequence with Constraints
Custom Heap Sort with Dynamic Element Prioritization
Graph Traversal with Unique Path Counting
Optimal Subset Sum with Constraints
Hierarchical Data Aggregation
Nested Palindrome Checker
Minimal Spanning Tree and Minimum Path Finding
Optimal Task Assignment with Constraints
Finding Path with Maximum Sum in Weighted Digraph
Balanced Partition Problem
Optimal Word Break with Constraints
Component Counting in Nested Structures
Custom Graph Traversal with Unique Node Counting
Nested JSON Object Comparison
Unique Graph Traversal with Distance Calculation
Nested JSON Object Flattener
Optimal Subarray Product with Constraints
Dynamic Programming for Nested Matrices
Nested Prime Factorization
Hierarchical Data Retrieval with Filtering
String Sequence Transformation
Nested Tuple Comparison
Substring Frequency Analysis
Optimal Job Scheduling with Constraints
Cyclic String Manipulation
Dynamic Programming with Modular Arithmetic
Cyclic String Shift and Count
Nested List Sum with Dynamic Depth Weights
Custom Matrix Rotation with Layer Tracking
Optimal Path Through a Triangular Grid
Graph Traversal for Unique Destination Count
Optimal Palindrome Partitioning with Constraints
String Manipulation with Unique Character Count
Optimal Subsequence Sum with Constraints
String Manipulation with Unique Character Frequency
Nested Array Product with Depth Weighting
Dynamic Programming with Range Constraints
Optimal Path in a 3D Grid with Obstacles
Custom Sort with Frequency and Order Preservation
Unique Graph Traversal with Distance Tracking
Custom String Encoding with Unique Patterns
Graph Traversal for Maximum Edge Weight Path
Dynamic Programming for Mixed Integer Knapsack
Custom Sorting with Weighted Priorities
Custom Sort Based on Frequency and Value
Advanced String Manipulation with Substitution
Dynamic Programming with Unique Path Counting
Maximum Sum of Non-Adjacent Elements with Constraints
Multi-Faceted Sorting Algorithm Application
Graph Traversal with Unique Node Visits
String Manipulation with Unique Character Grouping
Cyclic String Transformation with Unique Character Shift
Weighted Graph Traversal for Resource Allocation
Advanced Sorting with Custom Criteria
Nested List Max Product
Nested List Element Frequency
Optimal Subsequence Product with Constraints
Unique Palindromic Number Repetition Identification