Skip to content
CodeMarvels
All's the Code !
  • Home
  • Privacy Policy
  • About

Tag: c

Algorithms

Subset Sum Problem

Posted on September 29, 2013 by saurabh / 0 Comment

Given a set of positive integers and a value sum,the task is to find if there is a subset with sum equal to the given value. Example- Given set of numbers- {3,3...

Algorithms

All Permutations

Posted on September 9, 2013 by saurabh / 0 Comment

Given a string,the task is to print all the permutations of the string. A permutation is a rearrangement of the elements of an ordered list S.A string of length...

Algorithms

Longest path in a tree

Posted on August 26, 2013 by saurabh / 0 Comment

Given an unweighted and undirected tree,the task is to find the length of the longest path (from one node to another) in that tree.The length of a path in this ...

Algorithms

Applications of DFS

Posted on August 26, 2013 by saurabh / 0 Comment

One of the applications of DFS is to find the number of connected components in a graph.In graph theory, a connected component of an undirected graph is a sub-g...

Algorithms

Longest Common Subsequence

Posted on August 9, 2013 by saurabh / 0 Comment

Given two sequences,the task is to find the length of longest sub-sequence present in both of them. A sub-sequence is a sequence that appears in the same relati...

Algorithms

Activity Selection Problem

Posted on August 5, 2013 by saurabh / 2 Comments

Activity selection problem is an example of greedy algorithm.Greedy algorithms look for simple, easy-to-implement solutions to complex, multi-step problems by d...

Algorithms

Dijkstra’s Algorithm

Posted on July 29, 2013 by saurabh / 0 Comment

Given a network of cities and the distances between them,the task is to find the shortest path from a city(source) to all other cities connected to it.The netwo...

Algorithms

Minimum Cost Path (DP Example)

Posted on July 27, 2013 by saurabh / 0 Comment

Dynamic programming is a method for solving complex problems by breaking them down into simpler sub-problems. It is applicable to problems exhibiting the proper...

Algorithms

Magic Square

Posted on July 24, 2013 by saurabh / 0 Comment

A magic square is an arrangement of numbers in a square grid, where the numbers in each row, and in each column, and the numbers in the forward and backward mai...

Algorithms

Largest multiple of 3

Posted on July 23, 2013 by saurabh / 0 Comment

Given an array of digits,the task is to find the largest multiple of 3 that can be formed from array elements. Example- Input array is {4,8,0}.Then,the largest ...

Posts navigation

1 2 3 Next »

Categories

  • Algorithms
  • Android Development
  • BoshServlet
  • C++ projects
  • Code Philosophies
  • Conversational AI
  • Machine Learning
  • Miscellaneous
  • Notes
  • Society
  • Technology
  • Tutorial / Run-book
  • Uncategorized

Recent Posts

  • SSH without running .bashrc
  • Migrate data from one Cassandra server to another using medusa
  • A JS assistant to remind us to exercise during WFH days
  • Flush DNS cache in Ubuntu 20.xx and above
  • Change the datacenter set in cassandra-rackdc on Ubuntu

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
© 2022 CodeMarvels
Powered by WordPress | Theme: Graphy by Themegraphy