background preloader

Algorithm Tutorials

Algorithm Tutorials
Related:  AlgorithmsAlgorithmes&programmation

Big-O Algorithm Complexity Cheat Sheet Programmation en Python pour les mathématiques Nous [1] venons de publier un ouvrage consacré à l’utilisation du langage Python en cours de mathématiques, du collège jusqu’aux premières années universitaires. Le langage universel n’existe pas et l’utilisation de Python pourra être mise en parallèle avec d’autres langages, notamment fonctionnels, qui éclairent d’autres pans des mathématiques que nous aimons enseigner. Ces dernières pourront être travaillées avec profit grâce à Python qui reste, tout en étant à la fois simple et clair, robuste et professionnel. Ce langage est largement répandu et illustre naturellement de nombreux concepts de notre matière. Pour poursuivre la réflexion sur les rapports entre le langage mathématique et les langages de programmation, on pourra lire cet article de Gilles Dowek Au moins deux pistes s’offrent à nous : illustrer de manière efficace et justifiée une notion mathématique à l’aide de l’outil informatique ou inversement, faire des mathématiques en explorant une notion informatique. #! #! Listes Python

CS 240 Computer Science II Syllabus Spring 2008 SYLLABUS This page last changed 6/19/08 Objectives: To develop skills in the design and development of computer software continuing to utilize an object-oriented language, packages, modules and libraries. To develop understanding and build skills in the implementation and use of common data structures used in software development through data abstraction. To further study the Java language and learn to use UNIX as a software design environment. This course's prerequisite is CS 110. build program solutions using control structures of selection (if-then, switch), iteration (while, for) and functions understand the use of objects, methods, and classes understand the basic use of vectors (arrays) understand the design, implementation and testing of small problem solutions (25-50 lines of code) A context for this course and those that follow in the CS and IT POE's are at this page. Grading: 75 pts Exam 01 100 pts Exam 02 100 pts Exam 03 125 pts Exam 04 200 pts (approx.)

Python Course: Tutorial, Reference and Advanced Topics Adnan Aziz Elements of Programming Interviews We're excited to release a free soft copy sampler of EPI. Specifically, this PDF shows the organization, content, style, topics, and quality of our book. Amit, Tsung-Hsien and I have completed "Elements of Programming Interviews"! Have you ever... Wanted to work at a hot futuristic company? If so, you need to read Elements of Programming Interviews (EPI). The code of EPI is a collection of 300 problems with detailed solutions, including over 100 figures and 200 tested programs. The book begins with a summary of patterns for data structure, algorithms, and problem solving that will help you solve the most challenging interview problems. EPI concludes with a summary of the nontechnical aspects of interviewing, including common mistakes, strategies for a great interview, perspectives from across the table, negotiating the best offer, and much more. Adnan, Amit, and Tsung-Hsien have worked at Google, Facebook, Microsoft, IBM, Qualcomm, and several startups.

Python Course: Introduction into the Sys Module Information on the Python Interpreter Like all the other modules, the sys module has to be imported with the import statement, i.e. import sys If there are questions about the import statement, we recommend the introductory chapter of our basic course concerning this topic Modular Programming and Modules The sys module provides information about constants, functions and methods of the Python interpreter. dir(system) gives a summary of the available constants, functions and methods. Another possibility is the help() function. The module sys informs e.g. about the maximal recursion depth (sys.getrecursionlimit() ) and provides the possibility to change ist (sys.setrecursionlimit()) The current version number of Python can be accessed as well: >>> import sys >>> sys.version '2.6.5 (r265:79063, Apr 16 2010, 13:57:41) \n[GCC 4.4.3]' >>> sys.version_info (2, 6, 5, 'final', 0) >>> Command-line arguments #! We save this script as Standard data streams $ python < numbers.txt

Sorting Algorithm Animations Algorithms in Java, Parts 1-4, 3rd edition by Robert Sedgewick. Addison Wesley, 2003. Quicksort is Optimal by Robert Sedgewick and Jon Bentley, Knuthfest, Stanford University, January, 2002. Dual Pivot Quicksort: Code by Discussion. Bubble-sort with Hungarian (“Csángó”) folk dance YouTube video, created at Sapientia University, Tirgu Mures (Marosvásárhely), Romania. Select-sort with Gypsy folk dance YouTube video, created at Sapientia University, Tirgu Mures (Marosvásárhely), Romania. Sorting Out Sorting, Ronald M. Liste des algorithmes La liste complète de tous les principaux algorithmes (300), dans tous les domaines. Avec pour but de fournir un programme prêt à tourner pour chacun, ou une description de l'algorithme. Les langages de programmation incluent Java, JavaScript, et PHP, C ou C++ soit sous forme directe, soit générés à partir d'un source en Scriptol. Automate Powerset construction. Bioinformatique et chémoinformatique Needleman-Wunsch. Compression Compression sans perte Burrows-Wheeler transform. Codage par entropie Principe d'encodage qui assigne des codes aux symboles de sorte que la longueur des codes corresponde à la probabilité des symboles. Huffman coding. Compression avec perte d'information Linear predictive coding. Cryptographie Cryptage à clé secrète (symétrique) Utilise une clé secrète (ou une paire de clés directement liées), à la fois pour l'encryptage et le décryptage. Cryptage à clé publique (asymétrique) Utilise une paire de clés, dites clé publique et clé privée. Générateur de code de contrôle Voir.

Markov Chains – Explained | Tech Effigy Markov Chains is a probabilistic process, that relies on the current state to predict the next state. For Markov chains to be effective the current state has to be dependent on the previous state in some way; For instance, from experience we know that if it looks cloudy outside, the next state we expect is rain. We can also say that when the rain starts to subside into cloudiness, the next state will most likely be sunny. Usually when we have data, we calculate the probability of a state by counting the amount of times it occurs within a total of all states, we then end up with 0.5(50%) cloudy, 0.3(30%) rain, 0.2(20%) Sunny days of a year; Containing no information about when they occur relating to each other. To generate a simple prediction of events, we can say today is Cloudy, and from the table above we can determine that the next state will most likely be Rain with 50%, then we go to the Rain state, and the following day it will probably still be raining with 60%. Like this:

Calque Reverse a linked list in java « Think ! If you search for it you will get millions of solutions but sadly (like many things in internet) the first few solutions seem unintuitive and unnecessarily complex for such a simple problem, not sure why, anyway putting mine out there for somebody to point out why I should go for a more complex solution. [in java for a change] Idea : Use two references and reverse their links and proceed till we reach the end public void reverse_iterative { if(isEmpty()) { return;} //curr == null Node currNode,nextNode , loopNode; currNode = head; nextNode =; = null; while(nextNode ! Recursive Idea : Reverse the sublist starting from second node and point the second node to first, apply this recursively. private void reverse(Node curr) { if(isEmpty()) { return;} //curr == null if( == null) { head = curr; return; } reverse(; = curr; = null; } Share This