Algorithm / கணிப்பு நெறி
Definition
Sequence of steps that if followed to complete a task.
They operate on data, often utilizing data structures to manipulate and process information efficiently.
பொருள்
ஒரு பணியை முடிக்க பின்பற்ற வேண்டிய வழிகள்.
அவை தரவுகளின் மீது செயல்படுகின்றன, பலசமயம் தரவுத் திணைக்களங்களைப் பயன்படுத்தி தகவல்களை மதிப்பீடு செய்து செயலாக்குகின்றன.
Types of Algorithms
• Searching Algorithms:
Methods to find a specific data within a data structure (e.g., linear search, binary search).
• Sorting Algorithms:
Techniques to arrange data in a specific order (e.g., bubble sort, quicksort, mergesort).
• Graph Algorithms:
Algorithms for traversing and analyzing graphs (e.g., Depth-First Search (DFS), Breadth-First Search (BFS), Dijkstra’s algorithm for shortest paths).
• Dynamic Programming:
An algorithmic technique that solves complex problems by breaking them down into smaller, overlapping subproblems and storing the results to avoid redundant computations.
• Greedy Algorithms:
Algorithms that make locally optimal choices at each step with the hope of finding a globally optimal solution.
• Recursion:
A programming technique where a function calls itself to solve smaller instances of the same problem.
கணிப்பு நெறி வகைகள்
தேடல் கணிப்பு நெறி
ஒரு தரவு அமைப்பில் குறிப்பிட்ட தரவை கண்டுபிடிக்கும் முறைகள் (உதாரணமாக, வரிசைத் தேடுதல், இருமுறை தேடுதல்).
வரிசைப்படுத்தும் கணிப்பு நெறி
தரவை ஒரு குறிப்பிட்ட ஒழுங்கில் வரிசைப்படுத்தும் தொடர்புடைய முறைகள் (உதாரணம்: பபிள் ஸார்ட், க்விக் ஸார்ட், மெர்ஜ் ஸார்ட்).
வரையறை கணிப்பு நெறி
வரிசைப்படுத்தல் மற்றும் பகுப்பாய்வு செய்ய வரையறைகளை அணுகுவதற்கான கணிப்பு நெறி(உதாரணமாக, ஆழம் முதலில் தேடல் (DFS), அகல முதலில் தேடல் (BFS), குறைந்த தூரப்பாதைகளுக்கான டைக்க்ஸ்ட்ரா கணிப்பு நெறி).
இயக்கம் புரோகிராமிங்
சிக்கலான பிரச்சினைகளை சிறிய, ஒட்டுமொத்தமான துணைப் பிரச்சினைகளாகப் பிரித்து அவற்றின் முடிவுகளைச் சேமித்து மீண்டும் கருத்தாக்க வேண்டிய தேவை தவிர்க்கும் ஒரு கணிப்பு நெறி தொழில்நுட்பம்.
Greedy கணிப்பு நெறி
ஒவ்வொரு படியிலும் உள்ளூரில் சிறந்த தேர்வுகளைச் செய்யும் கணிப்பு நெறி, உலகளாவிய சிறந்த தீர்வை காணும் நம்பிக்கையுடன்.
ரீகர்ஷன்
ஒரு செயல்பாடு அதே பிரச்சினையின் சிறிய பகுதிகளை தீர்க்க தன்னையே அழைக்கும் ஒரு நிரலாக்க தொழில்நுட்பம்.
Example:
Array – multiple data’s to be stored in a variable of same data type.
எடுத்துக்காட்டு:
ஒரே தரவுத் வகையின் மாறியில் சேமித்தல்
C++
string foods[4] = { “Idly”, “Pongal” , “Vada” , “Dosa”};
int seqs[3] = { 1,5, 7};
in above example foods is string array of size 4 and seq is integer array of size 3.
foods array holds following values Idly, Pongal, Vada and Dosa
seqs array holds following values numbers 1,5, 7
Python
foods = [ “Idly”, “Pongal” , “Vada” , “Dosa”]
seqs = [1,5,7]
மேலுள்ள உதாரணத்தில் foods என்பது 4 அளவுள்ள string / அடுக்கம் வரிசையும், seqs என்பது 3 அளவுள்ள integer / முழுஎண் வரிசையுமாகும்.