All posts by Ankur

Mediatech: ४ महिने थोडक्यात

Mediatech… वडाळा येथे असलेलेली छोटीशी web development कंपनी. ऑफिस antop hill warehouse मध्ये. सोमवार २३ जून २०१४ रोजी मी या कंपनीत रुजू झालो व ७ नव्हेंबर २०१४ रोजी कंपनीमधून रजा घेतली.

तसा कार्यकाल फक्त ४ महिने आणि काही दिवसांचा! पण हा वेळ अनेक विविधरूपी आठवणींनी भरलेला होता. Technical आणि developer point of view ने तर बऱ्याच आठवणी आहेत परंतु इतरही काही किस्से सांगण्यालायक आहेत.

Continue reading Mediatech: ४ महिने थोडक्यात

Mediatech: एक अनुभव

वय वर्षे २२. महाविद्यालयीन शिक्षणपूर्ण झाल्यावर वारे वाहू लागतात ते म्हणजे नोकरीचे. आणि आजच्या जगात मनाला हवी तशी नोकरी मिळणे हा तर नशिबाचा भाग. मी कदाचित इतका भाग्यवान नसेन पण त्या काळात नशिबाने मला खरोखरच साथ दिली.

३ जून २०१४. ४ थ्या वर्षाच्या ८ व्या सेमिस्टरचा पेपर झाला. जवळपास college life संपलं असे म्हणण्यास काही हरकत नाही. दुसरा भाग म्हणजे मी काही ‘बेरोजगार’ नव्हतो. College campus मधून TCS मध्ये placement झाली होती. त्यामुळे घरातल्यांचा तसा काही दबाव नव्हता कि अंकुर नोकरीचं बघ म्हणून! TCS आज न् उद्या बोलवेल त्यामुळे तसं काही tension देखील नव्हतं.

Continue reading Mediatech: एक अनुभव

Implementing Sum of Subset by Backtracking in Java

The subset sum problem is a classic problem in computer science and is often solved using backtracking. The goal is to find subsets of elements selected from a given set whose sum adds up to a given number K.

Understanding the Problem

Given a set of n positive integers and a value m, the task is to determine all possible subsets whose sum is equal to m. This problem can be efficiently solved using backtracking.

Approach: Backtracking

Backtracking is a general algorithmic technique that incrementally builds candidates to a solution and abandons a candidate as soon as it is determined that the candidate cannot lead to a valid solution. In the subset sum problem, we:

  1. Start with an empty subset.
  2. Add elements one by one while keeping track of the sum.
  3. If the sum equals m, print the subset.
  4. If the sum exceeds m, backtrack and try another possibility.
Continue reading Implementing Sum of Subset by Backtracking in Java

Implementing 0-1 Knapsack in Java

The knapsack problem or rucksack problem is a problem in combinatorial optimization: Given a set of items, each with a mass and a value, determine the number of each item to include in a collection so that the total weight is less than or equal to a given limit and the total value is as large as possible.

In 0-1 Knapsack, the restriction is that, one cannot select fraction of any item. He/She must select either whole item or try with alternate one.

Continue reading Implementing 0-1 Knapsack in Java