7 algorithms and data structures





1. Sort Algorithms

Sorting is the most heavily studied concept in Computer Science. Idea is to arrange the items of a list in a specific order. Though every major programming language has built-in sorting libraries, it comes in handy if you know how they work. Depending upon requirement you may want to use any of these.
  • Merge Sort
  • Quick Sort
  • Bucket Sort
  • Heap Sort
  • Counting Sort
More importantly one should know when and where to use them. Some examples where you can find direct application of sorting techniques include:
  • Sorting by price, popularity etc in e-commerce websites

2. Search Algorithms

Binary Search (in linear data structures)
Binary search is used to perform a very efficient search on sorted dataset. The time complexity is O(log2N). Idea is to repeatedly divide in half the portion of the list that could contain the item, until we narrow it down to one possible item. Some applications are:
  • When you search for a name of song in a sorted list of songs, it performs binary search and string-matching to quickly return the results.
  • Used to debug in git through git bisect
Depth/Breadth First Search (in Graph data structures)

DFS and BFS are tree/graph traversing and searching data structures. We wouldn’t go deep into how DFS/BFS work but will see how they are different through following animation.
Applications:
  • Used by search engines for web-crawling
  • Used in artificial intelligence to build bots, for instance a chess bot
  • Finding shortest path between two cities in a map and many other such applications

3. Hashing

Hash lookup is currently the most widely used technique to find appropriate data by key or ID. We access data by its index. Previously we relied on Sorting+Binary Search to look for index whereas now we use hashing.
The data structure is referred as Hash-Map or Hash-Table or Dictionary that maps keys to values, efficiently. We can perform value lookups using keys. Idea is to use an appropriate hash function which does the key -> value mapping. Choosing a good hash function depends upon the scenario.
Applications:
  • In routers, to store IP address -> Path pair for routing mechanisms
  • To perform the check if a value already exists in a list. Linear search would be expensive. We can also use Set data structure for this operation.

4. Dynamic Programming

Dynamic programming (DP) is a method for solving a complex problem by breaking it down into simpler subproblems. We solve the subproblems, remember their results and using them we make our way to solve the complex problem, quickly.

*writes down “1+1+1+1+1+1+1+1 =” on a sheet of paper* What’s that equal to?

*counting* Eight!

*writes down another “1+” on the left* What about that?

*quickly* Nine!

How’d you know it was nine so fast?

You just added one more

So you didn’t need to recount because you remembered there were eight! Dynamic Programming is just a fancy way to say ‘remembering stuff to save time later’
Applications:
  • There are many DP algorithms and applications but I’d name one and blow you away, Duckworth-Lewis method in cricket.

5. Exponentiation by squaring

Say you want to calculate 232. Normally we’d iterate 32 times and find the result. What if I told you it can be done in 5 iterations?
Exponentiation by squaring or Binary exponentiation is a general method for fast computation of large positive integer powers of a number in O(log2N). Not only this, the method is also used for computation of powers of polynomials and square matrices.
Application:
  • Calculation of large powers of a number is mostly required in RSA encryption. RSA also uses modular arithmetic along with binary exponentiation.

6. String Matching and Parsing

Pattern matching/searching is one of the most important problem in Computer Science. There have been a lot of research on the topic but we’ll enlist only two basic necessities for any programmer.
KMP Algorithm (String Matching)
Knuth-Morris-Pratt algorithm is used in cases where we have to match a short pattern in a long string. For instance, when we Ctrl+F a keyword in a document, we perform pattern matching in the whole document.
Regular Expression (String Parsing)
Many a times we have to validate a string by parsing over a predefined restriction. It is heavily used in web development for URL parsing and matching.

7. Primality Testing Algorithms

There are deterministic and probabilistic ways of determining whether a given number is prime or not. We’ll see both deterministic and probabilistic (nondeterministic) ways.
Sieve of Eratosthenes (deterministic)
If we have certain limit on the range of numbers, say determine all primes within range 100 to 1000 then Sieve is a way to go. The length of range is a crucial factor, because we have to allocate certain amount of memory according to range.
For any number n, incrementally testing upto sqrt(n) (deterministic)
In case you want to check for few numbers which are sparsely spread over a long range (say 1 to 1012), Sieve won’t be able to allocate enough memory. You can check for each number n by traversing only upto sqrt(n) and perform a divisibility check on n.
Fermat primality test and Miller–Rabin primality test (both are nondeterministic)
Both of these are compositeness tests. If a number is proved to be composite, then it sure isn’t a prime number. Miller-Rabin is a more sophisticated one than Fermat’s. Infact, Miller-Rabin also has a deterministic variant, but then its a game of trade between time complexity and accuracy of the algorithm.
Application:
  • The single most important use of prime numbers is in Cryptography. More precisely, they are used in encryption and decryption in RSA algorithm which was the very first implementation of Public Key Cryptosystems
  • Another use is in Hash functions used in Hash Tables





DAFTAR HARGA KURSUS KOMPUTER DAN BAHASA INGGRIS
SILAHKAN KLIK DIBAWAH
  1. Kursus Komputer Administrasi Perkantoran Ms. Office Words
  2. Kursus Komputer Administrasi Perkantoran Ms. Excel
  3. Kursus Komputer Administrasi Perkantoran Ms. Power Point
  4. Kursus Komputer Paket Administrasi Perkantoran
  5. Kursus Komputer Administrasi Perkantoran Alternative Linux System
  6. Kursus Komputer Administrasi Perkantoran Komputerisasi kearsipan
  7. Kursus Komputer Administrasi Perkantoran akuntansi
  8. Kursus Komputer Administrasi Perkantoran Pengelolaan data statistik
  9. Kursus Komputer Administrasi Perkantoran Internet & E-Office
  10. Kursus Komputer Desain Grafis Photoshop
  11. Kursus Komputer Desain Grafis Corel Draw
  12. Kursus Komputer Paket Desain Grafis
  13. Kursus Komputer Desain Grafis & Multimedia
  14. Kursus Komputer Editing Video
  15. Kursus Komputer Desain Grafis Lengkap (Photoshop,Corel Draw & Page Maker)
  16. Kursus Komputer Desain Grafis Alternative Linux System
  17. Kursus Komputer 3D Animation
  18. Kursus Komputer Macromedia Flash
  19. Kursus Komputer Desain Arsitektur Autocad 2 Dimensi
  20. Kursus Komputer Desain Arsitektur Autocad 3 Dimensi
  21. Kursus Komputer Desain Arsitektur Paket Arsitektur Autocad
  22. Kursus Komputer Desain Arsitektur Alternative Linux System
  23. Kursus Komputer Teknisi Komputer Dasar
  24. Kursus Komputer Teknisi Komputer Lanjutan
  25. Kursus Pengaturan Software Windows
  26. Kursus Pengaturan Software Linux
  27. Kursus Perakitan Komputer
  28. Kursus Komputer Traffic Management With Mikrotik
  29. Kursus Komputer Traffic Management With Cisco
  30. Kursus Komputer Jaringan Komputer Berbasis WIndows
  31. Kursus Komputer Jaringan Komputer Berbasis Linux
  32. Kursus Komputer Pemrograman Desain 3D Studio Max
  33. Kursus Komputer Pemrograman Media Adobe Premiere
  34. Kursus Komputer Pemrograman Borland Delphi
  35. Kursus Komputer Pemrograman MYOB
  36. Kursus Komputer Pemrograman Turbo Cash
  37. Kursus Komputer Pemrograman S.A.P.
  38. Kursus Komputer Pemrograman Visual Basic
  39. Kursus Komputer Pemrograman SQL Server
  40. Kursus Komputer Pemrograman Clipper
  41. Kursus Komputer Web Master
  42. Kursus Komputer Membuat Blog
  43. Kursus Komputer Pemrograman PHP
  44. Kursus Komputer Building Web with CMS
  45. Kursus Komputer Pemrograman Web Design
  46. Kursus Komputer Pemrograman Dream Weaver
  47. Kursus Komputer PHP Programming & MYSQL basic
  48. Kursus Komputer PHP Programming & MYSQL Advanced
  49. Kursus Komputer Web Design Level 1(Photoshop dan Flash)
  50. Kursus Komputer Web Design Level 2 (Dreamweaver, CSS, Javascript)
  51. Kursus Komputer Pemrograman CC++
  52. Kursus Komputer Pemrograman Java Script
  53. Kursus Komputer Pemrograman SPSS
  54. Kursus Komputer Pemrograman Oracle
  55. Kursus Komputer Pemrograman VB. Net
  56. Kursus Komputer Project Management With MS. Project Application
  57. Kursus Komputer Management Information System
  58. Kursus Komputer System Analyst and Design
  59. Kursus Komputer Customer Relationship Management
  60. Kursus Komputer IT Governance
  61. Kursus Komputer IT Risk Management
  62. Kursus Komputer Pemrograman Kali Linux
  63. Kursus Komputer Basic IT Ubuntu
  64. Kursus Komputer Training Certified Ethical Hacker
  65. Kursus Bahasa Inggris Elementary I
  66. Kursus Bahasa Inggris Elementary II
  67. Kursus Bahasa Inggris Intermediate
  68. Kursus Bahasa Inggris Post Intermediate
  69. Kursus Bahasa Inggris Advance I
  70. Kursus Bahasa Inggris Advance II
  71. Kursus Bahasa Inggris Conversation
  72. Kursus Bahasa Inggris English For Business
  73. Kursus Bahasa Inggris TOEFL I
  74. Kursus Bahasa Inggris TOEFL II
  75. Kursus Bahasa Inggris GMAT I
  76. Kursus Bahasa Inggris GMAT II





kursus komputer di kosambi karawang | tempat kursus di karawang | kursus komputer di karawang barat | tempat kursus komputer di cikampek | raditya komputer kabupaten karawang | lembaga kursus dan pelatihan prisma computer kabupaten karawang, jawa barat | lpk sinergi pusat kursus komputer kabupaten karawang jawa barat | tempat kursus komputer di karawang 2016 | sinergi kursus komputer it training kabupaten karawang, jawa barat | tempat kursus komputer di kosambi karawang | biaya kursus komputer di karawang | kursus komputer bersertifikat di karawang | tempat kursus komputer di karawang | kursus komputer daerah karawang | bimbel jakarta timur kota jakarta timur, daerah khusus ibukota jakarta | bimbel terbaik di jakarta timur | tempat bimbel murah di jakarta timur | bimbel primagama jakarta timur | tempat bimbel di jakarta selatan | tempat les di jakarta timur | bimbel murah dan berkualitas | tempat bimbel murah di jakarta timur | bimbel terbaik di jakarta timur | bimbel murah dan berkualitas | ganesha operation go kota jakarta timur daerah khusus ibukota jakarta | les privat murah jakarta timur | bimbel primagama jakarta timur | bimbel sd di jakarta timur | les privat matematika di jakarta timur | tempat bimbel murah di jakarta timur | bimbel terbaik untuk smp | bimbel jakarta timur kota jakarta timur, daerah khusus ibukota jakarta | bimbel primagama jakarta timur | tempat les di jakarta timur | tempat bimbel di jakarta selatan | bimbel murah dan berkualitas | tempat bimbel terbaik di jakarta | bimbel terbaik di jakarta timur | tempat les di jakarta timur | bimbel jakarta timur kota jakarta timur, daerah khusus ibukota jakarta | bimbel murah dan berkualitas | tempat bimbel di jakarta selatan | bimbel primagama jakarta timur | tempat les murah di jakarta timur | les privat murah jakarta timur | harga bimbel primagama 2018 | biaya bimbel primagama 2018 | biaya primagama | biaya les primagama 2018 | biaya primagama 2018 | brosur primagama 2018 | primagama adalah | biaya bimbel primagama bekasi | tempat bimbel terbaik di jakarta selatan | bimbel murah di jakarta selatan | tempat les yang bagus untuk anak sd | bimbel murah dan berkualitas | bimbel terbaik untuk smp | tempat les bimbel di jakarta barat | tempat les terdekat | tempat bimbel murah di jakarta timur | bimbel terbaik di jakarta timur | les privat murah jakarta timur | bimbel jakarta timur kota jakarta timur, daerah khusus ibukota jakarta | les privat matematika di jakarta timur | tempat les matematika di jakarta timur | bimbel primagama jakarta timur | tempat bimbel di jakarta selatan | bimbel murah di jakarta | biaya bimbel murah | bimbel terbaik untuk smp | bimbel smp | bimbel sma | bimbel sd | bimbel yang bagus untuk anak sd | alamat kursus komputer jakarta timur | kursus komputer kota jakarta timur, dki jakarta | biaya kursus komputer di jakarta timur | lpk trimitsa kursus komputer cililitan, kota jakarta timur, daerah khusus ibukota jakarta | tempat kursus komputer di jakarta | biaya kursus komputer di internusa | kursus komputer jakarta pusat | kursus komputer jakarta utara | 

Posting Komentar

1 Komentar
* Please Don't Spam Here. All the Comments are Reviewed by Admin.