#1 tech recruiter in thailand

Coding Patterns ยอดนิยม สำหรับ สัมภาษณ์งานในบริษัท FAANG

See the original English version of this article here

การเตรียมตัวสำหรับ Coding Interviews สามารถทำได้ง่ายขึ้นด้วยการ Focus ไปที่ Coding Patterns ดังนั้น Software Engineer ทุกคนควรเรียนรู้และทำความเข้าใจ Coding Patterns เช่น Sliding Window, Two Pointers และ Two Heaps เป็นต้น หากได้ลองทำแล้ว เชื่อว่า Software Engineers จะสามารถพัฒนาความสามารถในการ “จับคู่ปัญหาใหม่กับปัญหาที่เคยเจอหรือเคยลองทำมาแล้ว” ในบทความนี้จึงรวบรวม Coding Patterns ยอดนิยม สำหรับ สัมภาษณ์งานในบริษัท FAANG มาให้แล้ว

LeetCode Problems Distribution

LeetCode (LC) ซึ่งเป็น Repository ของ Coding Problems ที่ใหญ่ที่สุด มีคำถามมากกว่า 2,000 ข้อ ซึ่งคำถามแต่ละข้อใน LeetCode สามารถติด Tag ได้ 1 หัวข้อหรือมากกว่านั้น ซึ่งสามารถแยกเป็นหมวดหมู่ได้ ดังนี้

  • Data Structures เช่น Array, HashTable และ Tree เป็นต้น
  • Algorithmic Techniques เช่น Greedy, Divide and Conquer และ Sorting เป็นต้น
  • Coding Patterns เช่น Sliding Window, Depth First Search และ Topological Sort เป็นต้น

และภาพด้านล่างนี้ แสดงให้เห็นถึงภาพรวมขอหัวข้อต่าง ๆ ใน LeetCode

LeetCode

LeetCode Topic Distribution

เราจะเห็นว่า หัวข้อยอดนิยม 3 อันดับแรก คือ

  • Array: 1142 Problems
  • String: 549 Problems
  • Hash Table: 392 Problems

ต่อไปเรามาดูรายละเอียดเพิ่มเติมในหัวข้อเหล่านี้ของแต่ละหมวดหมู่กันเถอะ

1. Data Structures

นี่คือ Data Structures อันดับต้น ๆ ที่ควรค่าแก่การเรียนรู้

  • Array (1142 Problems)
  • String (549 Problems)
  • Hash Table (392 Problems)
  • Tree (191 Problems)
  • Matrix (171 Problems)
  • Stack (128 Problems)
  • Heap or Priority Queue (107 Problems)
  • Graph (102 Problems)
  • Linked List (69 Problems)
  • Trie (44 Problems)

2. Algorithmic Techniques

นี่คือ Algorithmic Techniques อันดับต้น ๆ ที่ควรค่าแก่การเรียนรู้

  • Dynamic Programming (383 Problems)
  • Sorting (253 Problems)
  • Greedy (248 Problems)
  • Binary Search (186 Problems)
  • Backtracking (91 Problems)
  • Recursion (44 Problems)
  • Divide and Conquer (38 Problems)

3. Coding Patterns

นี่คือ Coding Patterns อันดับต้น ๆ ที่ควรค่าแก่การเรียนรู้

  • Depth First Search (250 Problems)
  • Breadth First Search(198 Problems)
  • Binary Search (186 Problems)
  • Two Pointers (147 Problems)
  • Sliding Window (72 Problems)
  • Monotonic Stack (44 Problems)
  • Union Find (63 Problems)
  • Memoization (32 Problems)
  • Topological Sort (28 Problems)
  • Segment Tree (27 Problems)

และเมื่อมัดรวมหมวดหมู่ทั้งหมด จากข้อมูลที่กล่าวมาข้างต้น นี่คือ List ที่รวบรวม “Coding Patterns/Techniques ที่ดีที่สุดและควรค่าแก่การเรียนรู้” เรามาดูกันเลย

Coding Patterns ที่ควรค่าแก่การเรียนรู้

1. Two Pointers (Arrays, Strings, Fast & Slow Pointer)

Pattern นี้ครอบคลุมชุดคำถามจำนวนมาก ที่เกี่ยวข้องกับ Arrays และ Strings ซึ่งเป็น Data Structures ที่มีการ Tag สูงสุด และ Fast & Slow Pointer สามารถเข้าใจได้ง่ายว่าเป็น Variation ของ Two Pointers Pattern

2. Sliding Window (Arrays, Strings, Hash Tables)

Sliding Window ส่วนใหญ่จะครอบคลุม Problems ที่เกี่ยวกับ Data Structures ยอดนิยม อย่าง Arrays, Strings และ HashTables

3. Tree และ Graph Depth First Search (Matrix Traversal)

Trees และ Graphs Problems ส่วนใหญ่ จะสามารถแก้ไขได้โดยใช้ Depth First Search (DFS) Matrix Traversal ซึ่งเป็น DFS Based Pattern เช่นกัน ซึ่งส่วนใหญ่จะครอบคลุม Matrix-related Problems

4. Tree และ Graph Breadth First Search (Queue, Subsets, Matrix Traversal และ Topological Sort)

Breadth First Search (BFS) เป็น Pattern ที่เป็นประโยชน์มาก และ Pattern ของ BFS เช่น Subsets, Matrix Traversal และ Topological Sort นั้น ครอบคลุม Problems จำนวนมาก

5. Binary Search (Arrays)

Binary Search ถูกใช้เพื่อแก้ปัญหา Coding Questions เป็นจำนวนมาก

6. Interval Merge

แม้ว่าจะมี Problems ไม่มากที่เกี่ยวกับ Interval Merge แต่ Problems เหล่านี้มักจะปรากฏใน Coding Interviews

7. Recursion/Backtracking

Backtracking และ Recursion ใช้เพื่อแก้ Problems ที่หลากหลาย ขอแนะนำให้เรียนรู้เทคนิคเหล่านี้

ซึ่ง Programming Interviews ส่วนใหญ่ มักเจอคำถามที่อยู่ใน LeetCode อยู่เสมอ ซึ่ง Software Engineers ควรฝึกฝน Coding Problems ก่อนการสัมภาษณ์งาน ดังนั้น การเตรียมตัวสัมภาษณ์งานอย่างชาญฉลาด ก็คือ การ Focus ไปที่ Problem Patterns และทั้งหมดนี้ ก็คือ Coding Patterns ยอดนิยม สำหรับ สัมภาษณ์งาน FAANG

บทความแนะนำ

• ตัวช่วยออกแบบ GitHub  Profile ให้โดดเด่นและน่าสนใจ Click อ่านเลย

• แจกฟรี 20 Coding Problem Patterns สำหรับ Software Developer Click อ่านเลย

• 10 Challenging Coding Projects สำหรับ Developers Click อ่านเลย

ถ้าคุณชอบบทความนี้ อย่าลืมกด Like เพจของ ISM Facebook เพื่อไม่ให้พลาดข่าวสาร สำหรับคนไอที

หากคุณกำลัง หางาน IT สามารถส่ง Resume สมัครงานกับเราได้ที่ https://www.ismtech.net/submit-your-resume ให้ ISM Technology Recruitment เป็นอีกหนึ่งตัวช่วย ให้คุณได้ “ชีวิตการทำงานในแบบที่คุณต้องการ”

ISM เชี่ยวชาญในธุรกิจ IT Recruitment & IT Outsourcing โดยเฉพาะ เปิดทำการมากว่า 30 ปี มีพนักงานทุกสายและทุกระดับทางด้าน IT ที่ได้ร่วมงานกับลูกค้าองค์กรใหญ่ที่มีชื่อเสียงและบริษัทข้ามชาติมากมาย

Source: https://interviewnoodle.com/

en